If you are reading this, you know the gist of “!important” is to counter-act the normal application of CSS rules based on selector specificity. One way to look at this is that it’s a shortcut to make up for another rule’s selector that is too broad. Another way would be to describe it as getting things done and moving on. We can argue both ways depending on how much time/budget you have — but more importantly — how many places a given CSS file will be used.
(more…)
Posts Tagged ‘CSS’
Pitfalls of styling the HTML element
Wednesday, April 13th, 2011
This was fun painful.
On the new ablesense.com website design, I had foolishly applied some styles to the <html> element — specifically my font stack for the website. The particular selection of fonts was very important in making this mistake obscure:
html { font-family: helvetica, arial, sans-serif; }
Browsers have default fonts
The fonts all looked fine in Firefox, Safari, Chrome, and Internet Explorer (Helvetica on Mac, and Arial on PC). This lines up with the CSS rule above, so it seemed like everything was fine — but it was not. (more…)
How to progressively enhance websites
Sunday, February 7th, 2010
Do you manage a web development team? Have you hired one to build a website or application? Making sure your web developers embrace Progressive Enhancement makes a better experience for your end-users, your web development team, and you. (more…)
