So I found myself wanting to override a few items in a sitewide CSS file, but only for a single page… Rather than make entire new CSS elements, I figured there had to be a way to override the CSS file with a <style> clause within the page itself…
Sure enough, I finally figured it out… !important…
[code=css]
[/code]
!important can go at the end of any style attribute and it will override anything that isn’t “important”.
!important is my crucial go-to whenever I’m too lazy to figure out a more specific hierarchy.
Hey Shawn,
This is great, Thanks man,
I am pretty good at css but still learning.
Thanks for the tip.
Joseph
Not to forget the big bad and ugly IE #fail at it.. It ignores !important
Who cares… IE is stupid. I’m tempted to just block it at the router level.
@I’m tempted to just block it at the router level.
LOL – I wish IE would go away as well !
The syntax for that little gem threw me off the first time I saw it. I kept reading it as “not important”.