简体   繁体   中英

How can I disable element.style?

I have the element.style 'margin-left: 0;' on one of my ul classes. I would like to get rid of it but I can't change the js file without messing everything up so I'm wondering if there is a way to disable this in my CSS? Thanks in advance.

In your CSS just do

ul.something {
    margin-left: auto !important; // or whatever px instead of auto
}

That will work most of the time, provided it's the last stylesheet to be loaded, otherwise it might be overridden by a different style again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM