HTML and CSS Reference
In-Depth Information
While being able to grab the title or alt text of an image and display it
on the page as a pseudo-element would be practical, this isn't possible.
Remember that the pseudo-element must be a child of the element to which
it is being applied. Images, which are void (or empty) elements, don't have
child elements, so it wouldn't work in this case. The same would apply to
other void elements, such as <input> .
Dreaded Browser Support
As with any front-end technology that is gaining momentum, one of the first
concerns is browser support. In this case, that's not as much of a problem.
Browser support for :before and :after pseudo-elements stacks up like
this:
• Chrome 2+,
• Firefox 3.5+ (3.0 had partial support),
• Safari 1.3+,
• Opera 9.2+,
• IE8+ (with some minor bugs),
• Pretty much all mobile browsers.
The only real problem (no surprise) is IE6 and IE7, which have no support.
So, if your audience is in the Web development niche (or another market
that has low IE numbers), you can probably go ahead and use pseudo-
elements freely.
Search WWH ::




Custom Search