Prev | Current Page 499 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

More
specifically, it allows the control and presentation of extra content, counters, and
quote characters through the use of the :before and :after pseudo-elements.
The Ultimate CSS Reference 348
content
content: { { string | uri | counter |
attr(identifier) | open-quote | close-quote |
no-open-quote | no-close-quote } ??¦ | normal | none
| inherit } ;
The content property, used in
conjunction with the :before (p. 113)
or :after (p. 114) pseudo-elements,
inserts generated content.
Use the display property to control the
type of box that??™s generated for the
content.
Note that the generated content is only
rendered??”it doesn??™t appear in the DOM
tree. In other words, generated content doesn??™t alter the document as such??”only
the presentation.
Example
This style rule inserts the text ???You are
here:??? before the element with the ID
"breadcrumbs":
#breadcrumbs:before {
content: "You are here:";
margin-right: 0.5em;
}
That said, generated content is still matched by pseudo-elements like :first-letter
(p.


Pages:
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511