Saturday, January 23, 2010

Cascading Style Sheets - Pseudo Elements

CSS gives us the ability to style certain parts of the document by using pseudo elements. Pseudo elements refer to parts of the document that you cannot directly access through the HTML. Pseudo-elements allow you to style information that is not available in the document tree. But the browser can access those elements. For instance, using standard selectors there is no way to style the first letter or first line of an element's content.

Pseudo elements act like you've injected new HTML into the page and have the flexibility to style those new imaginary elements. Because we don't have direct control over them, it is the browsers responsibility to access them.

Read more ...

0 comments: