Array

Making Better User Interfaces with CSS3

Must Read

Events

EventDispatcher is the base class for all objects that can be a target for events. Many native classes inherit...

Market Positioning

Once you have determined your market segment(s), you must determine how you will position you products and services to...

Black Friday Is Not The Day After Thanksgiving Anymore

It was not hard to notice in 2010 that Back to School started just after the 4th of July,...
Admin
test

For far too long, we developers have hacked around CSS to get the effects we need in our code. We’ve used JavaScript or server-side code to stripe table rows or put focus and blur effects on our forms. We’ve had to litter our tags with additional class attributes just so we could identify which of our fifty form inputs we want to style.

But no more! CSS3 has some amazing selectors that make some of this work trivial. In case you forgot, a selector is a pattern that you use to help you find elements in the HTML  document so you can apply styles to those elements. We’ll use these new selectors to style a table. Then we’ll take a look at how we can use some other CSS3 features to improve our site’s print style sheets, and we’ll split content into multiple columns.

We’ll look at these CSS features in this chapter:

:nth-of-type [p:nth-of-type(2n+l){color: red;}]
Finds all n elements of a certain type. [C2, F3.5, S3, IE9, 09.5,IOS3, A2]
:first-child [p:first-child{color:blue;}]
Finds the first child element. [C2, F3.5, S3, IE9, Q9.5, IOS3, A2]

:nth-child [p:nth-child(2n+l){color: red;}]
Finds a specific child element counting forward. [C2, F3.5, S3, IE9,
09.5, IOS3, A2]
:last-child [p:last-child{color:blue;}]
Finds the last child element. [C2, F3.5, S3, IE9, 09.5, IOS3, A2]
:nth-last-child [p:nth-last-child(2){color: red;}]
Finds a specific child element counting backward. [C2, F3.5, S3,
IE9, 09.5, IOS3, A2]
:first-of-type [p:first-of-type{color:blue;}]
Finds the first element of the given type. [C2, F3.5, S3, IE9, 09.5,
IOS3, A2
:last-of-type [p:last-of-type{color:blue;}]
Finds the last element of the given type. [C2, F3.5, S3, IE9, 09.5,
IOS3, A2
Column support [#content{ column-count: 2; column-gap: 20px;
column-rule: 1 px solid #ddccb5;}]
Divides a content area into multiple columns. [C2, F3.5, S3, 09.5,
IOS3, A2
:after [span.weight:after { content: “lbs”; color: #bbb;}]
Used with content to insert content after the specified element. [C2,
F3.5, S3, IE8, 09.5, IOS3, A2]
Media Queries [media=”only all and (max-width: 480)”]
Apply styles based on device settings. [C3, F3.5, S4, IE9, OlO.l,
IOS3, A2

Latest News

Top 10 Provinces of Thailand Not to be missed for Travel

10 SuratthaniThe source of the proverbial Chaiya salted egg. Surat Thani is a province with many attractions,...

Underlight As Accent, For Power and The Main Light for Photography

Underlighting, in which fill or accent light comes from under the topic, is not widely used technique in the traditional Portraits, even though it will have...

How To Fix Overexposure As A Creative Tool, The Complete Guide

As an creative tool, overexposure is sort of underrated. What I’m close to propose could be a deliberate and well thought out technique for...

7D Mark II is Canon’s best DSLR cameras without full-frame sensor.

The expected long-awaited Canon EOS 7D Mark II are shipping in November for $ 1,799 without a lens. With a higher price tag, you...

Low key photography and How to isolate your subject.

Low key photography doesn’t depend on underexposure to make its point; the key to low key is that the majority of tones, even correctly...

More Articles Like This