0

I have created an extension. I added a namespace also, but my CSS is conflicting with the CSS on some websites.

Here is a sample of my CSS:

.myextention input.myclass{
   border:1px solid
}

And the CSS of another website is:

input {
    height:150px;
}

This is only one case. There are lots of cases on which my extension conflicts.

Is there is any right way to do this?

Thanks.

Ben
  • 1,571
  • 1
  • 13
  • 29
soccer7
  • 3,547
  • 3
  • 29
  • 50

1 Answers1

2

When ever we are working on applications, we will come to know all the classes which is going to load. Where as with extensions, that is not the case.

This is a common problem whenever you are working with extensions. You should be very specific in writing the class with maximum properties. Below is the common properties that needs to overwrite in any extension involves input elements.

.myextention input.myclass{
     position: value;
     display: value;
     width: value; 
     height: value;
     border: value;
     margin: value;
     padding: value;
}

It is always advisable to cover many properties as per your extension.

KiV
  • 2,225
  • 16
  • 18