How do I add generated content using the ":before" and ":after" pseudo-classes in conjunction with the ZOOM CSS class: ".description"?
Adding generated content into search results CSS
Collapse
X
-
Just as you would for any other CSS class.
An example below:
Note that not all browsers support this, as far as I know. For one, IE7 does not seem to support this. Firefox seems to.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