Understanding CSS Pseudo-Selectors | Simple Time-Saving Solutions : 5ubliminal's TellinYa

<a href="http://www.tellinya.com/art2/352/">Understanding CSS Pseudo-Selectors | Simple Time-Saving Solutions : 5ubliminal's TellinYa</a>
Must Reads: Web Scraping | Link Farming | Code Snippets | SEO Freeware
Reveal More!
I'm a one man show…

And aside from programming I do all design myself. I got trust issues and so on, but this is not important. I'll show you here a simple trick that saved me back in the days when 5ubliminal and CSS weren't homies.

Let's say you have an OL. And you want first row(element) to have a different style then the rest as that is the title. But you don't want to use a class on it and you need an universal solution. Well… do you know what pseudo-selectors are?

ol li:first-child {/* CSS comes here */}
//-- this will apply the style to the first LI child of the OL (first row)
I wanted to tell you about CSS pseudo-selectors but…

It's not worth writing again what others have written very well. So, to get to know the topic visit these reference pages: Microsoft and CSSDrive. You'll be experts in no time and those of you who missed these out will have a great time using them. There's a bunch of them and sky's the limit in how you can combine them. GUIStuff has some cool posts on this topic: p1, p2.

Post Feedback 
Name *
Mail *
URL
« Anti-Spam
» URL will only go live after a review. Comments are moderated. «
5ubliminal's TellinYa.com SEM & SEO Blog © 2007 - All rights reserved unless mentioned otherwise .
Rendered On : [Thursday, 07 August, 2008 - 22:50:10 GMT]   No Ajax / Flash Used Here
" Understanding CSS Pseudo-Selectors | Simple Time-Saving Solutions : 5ubliminal's TellinYa "