Emily Harris
Emily Harris

Reputation: 147

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.

Upvotes: 1

Views: 1465

Answers (1)

Alfo
Alfo

Reputation: 4819

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.

Upvotes: 3

Related Questions