What are the implications of using “!important” in CSS? [duplicate]

I’ve been working on a website for a few months, and a lot of times when I’ve been trying to edit something, I have to use !important, for example:

div.myDiv { 
    width: 400px !important;
}

in order to make it display as expected. Is this bad practice? Or is the !important command okay to use? Can this cause anything undesired further down the line?

9 Answers
9

Leave a Comment