Skip to main content
Post Closed as "Duplicate" by TylerH css
Question Protected by dippas
Adjusted code indentation, revised grammar, and removed fluff
Source Link
TylerH
  • 21.3k
  • 86
  • 84
  • 122

I've been working on a premade packaged shopping cart website for a few months, and a lot of times when I've been trying to edit something, I have to use something like!important, for example:

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

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

Thanks :)

I've been working on a premade packaged shopping cart website for a few months, and a lot of times when I've been trying to edit something, I have to use something like for example

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

To make it display as expected. Is this bad practice? Or is the !important command perfectly legal? Can this cause anything undesired further down the line?

Thanks :)

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?

edited tags
Link
Stephan Muller
  • 27.7k
  • 18
  • 89
  • 127
edited tags
Link
Piskvor
  • 93.1k
  • 46
  • 182
  • 226
Source Link
Kyle
  • 67.6k
  • 28
  • 148
  • 153
Loading