How do I add generated content using the ":before" and ":after" pseudo-classes in conjunction with the ZOOM CSS class: ".description"?
Announcement
Collapse
No announcement yet.
Adding generated content into search results CSS
Collapse
X
-
Just as you would for any other CSS class.
An example below:
Code:.description { font-size: 100%; color: #008000; } .description:before { content: "SOME BEFORE TEXT"; } .description:after { content: "SOME AFTER TEXT"; }
Here's a page that demonstrates this. Load it up in IE7 and Firefox, and you'll see that the extra graphic and text won't appear in IE7. It's documented to not work in ANY version of Explorer.
Comment