October 8, 2008 – 5:38 pm
I had never heard of CSS specificity until I started my new job as a web developer, and let me tell you, it’s quite interesting. Now tell me, which style do you think would win if they are printed in this order in the style sheet?
a#a-02 { background-image : url(n.gif); }
a[id=”a-02″] { background-image : url(n.png); […]
September 3, 2008 – 10:27 am
I have been in a few situations (very few) where I want a page to look different in Firefox. Here’s a little snippet of how you could code it. Please note that this CSS will not validate but will work perfectly fine.
/*”className” is your class or ID*/
/*FireFox 2 */
.className, x:-moz-any-link {font-weight:bold;}
/*FireFox 3*/
.className, x:-moz-any-link, x:default […]
June 14, 2008 – 12:13 pm
The pre tag stands for preformatted text, but it acts differently in all browsers. Here is a snippet of code that should cover all bases:
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
[…]