Is there a way to tell an html element to ignore any stylesheets?

后端 未结 7 1952
忘了有多久
忘了有多久 2020-12-03 10:15

I\'m attempting to add a drop down to a page that already has a global \"select\" style. Is there a way to tell the new select list to ignore the global style? There\'s ab

7条回答
  •  抹茶落季
    2020-12-03 10:54

    you can eaither add cascading styles like:

    #id1 .class1 select

    or

    .class:width:200px !important

    The !important will make it use the style you want rather than the global one, but if you have to overwrite it it can get a little tricky. You have to use a combination of both.

提交回复
热议问题