Re: add an image to a link with CSS - possible?
- From: "Jonathan N. Little" <lws4art@xxxxxxxxxxxxx>
- Date: Fri, 23 Nov 2007 12:13:58 -0500
Tomasz Chmielewski wrote:
I have a part of a page which contains text links to other subpages:
<a href="subpage.html">Subpage</a>
Now, I'd like each link to contain a tiny image after each text:
<a href="subpage.html">Subpage<img src="arrow.png"></a>
Is it possible to do something similar with CSS only?
Something like:
a:after { content: blah_image }
Which would add an image after each link?
no because generated content is just play text, no html. What you can do is make a special class with the image as a background and using padding to show the arrow.
/* arrow.png is say 10x10px */
a.subpage{
padding-right: 12px;
background: transparent url(arrow.png) no-repeat top right;
}
<a href="subpage.html" class="subpage">Subpage</a>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
.
- Follow-Ups:
- Re: add an image to a link with CSS - possible?
- From: Ben C
- Re: add an image to a link with CSS - possible?
- References:
- add an image to a link with CSS - possible?
- From: Tomasz Chmielewski
- add an image to a link with CSS - possible?
- Prev by Date: Re: Flicker
- Next by Date: Re: add an image to a link with CSS - possible?
- Previous by thread: Re: add an image to a link with CSS - possible?
- Next by thread: Re: add an image to a link with CSS - possible?
- Index(es):