I love CSS
02/15/2009
I finally got the strength to give IE6 even less attention than I usually do, off the back of a post from Roger Johansson. Because of this, I also feel confident that it's acceptable to use techniques available to more advanced browsers. The idea that all websites should look the same in all browsers is unrealistic and inappropriate, so this has opened up a whole new world of CSS that I can now freely use, and I've found it really fun. For example, in older browsers, all my category and archive links in my "sidebar" will be white, but new-browser-users will be rewarded with easier differentiation between link colours with the following gem:
menu > li li:nth-child(2n) a {
color:#656565;
}
And to tidy up the last paragraph margins and get rid of the unattractive superfluous margin, I can now use this and be safe in the knowledge that people who care about this sort of thing will be able to see/appreciate it:
menu div.content p:last-child {
margin-bottom: 0;
}
I don't know how some people can dislike CSS. It's such an awesome way of working.
Enthusiasm fuelling this post brought to you by grape juice and vodka.