Hi
Is it possible to add <> when a link is hovered.
Something like this:
link
<link> (when mouseover/hover)
With css.
| SitePoint Sponsor |
Hi
Is it possible to add <> when a link is hovered.
Something like this:
link
<link> (when mouseover/hover)
With css.

you can use the content generation in css, but that won't work in some browsers.
Maybe try something like this:
HTML Code:<a href="someplace.html"> <span class="hover"><</span>Link Text<span class="hover">></span> </a>Code:a span.hover { visibility: hidden; } a:hover span.hover { visibility: visible; }
Code:a:hover::before { content:"<"; } a:hover::after { content:">"; }
Simon Pieters

Internet Explorer doesn't support content generation though, does it?


Unfortunately no it doesn't support itOriginally Posted by stormrider
You will need to add this to your snippet to make it work in ie.
Code:a:hover {visibility:visible}
IE won't activate the span effect unless something changes in the anchor on hover. The visibility:visible does this without any other changes needed.![]()
www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge
Bookmarks