css

advanced selectors

attribute selectors i used it in registration form wp_members
http://www.w3schools.com/css/css_attribute_selectors.asp

how can i select first second or third element with given class name using CSS?
table.myClass tr > td:first-child /* First column */
{
/* some style here */
}
table.myClass tr > td:first-child+td /* Second column */
{
/* some style here */
}
table.myClass tr > td:first-child+td+td /* Third column */
{
/* some style here */
}

http://stackoverflow.com/questions/2751127/how-can-i-select-first-second-or-third-element-with-given-class-name-using-css

:nth-child

ul li:nth-child(3) {
color: red;
}

http://coding.smashingmagazine.com/2009/08/17/taming-advanced-css-selectors/

Advertisements

One thought on “advanced selectors

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s