471,598 Members | 1,186 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 software developers and data experts.

Place icon on left of tag

Hello,

How can I place an icon (image) on left side of a tag, for example, a
anchor, a h1, etc?

I would like to do this using only CSS.

Thanks,
Miguel

Oct 24 '07 #1
1 2701
shapper wrote:
Hello,

How can I place an icon (image) on left side of a tag, for example, a
anchor, a h1, etc?

I would like to do this using only CSS.
well you could use a background image and padding... for example a
offsite link indicator with a little 10x10 arrow image:

a.offsite {
/* width of image + whatever you want for spacing */
padding-left: 12px;
/* little 10x10 arrow GIF */
background: transparent url(offsite.gif) no-repeat bottom left;
}
<a class="offsite" href="http://wwww.example.com>Offsite link</a>
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Oct 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Roedy Green | last post: by
10 posts views Thread by Zeljko | last post: by
7 posts views Thread by Just D. | last post: by
3 posts views Thread by Benny Raymond | last post: by
6 posts views Thread by Lespaul36 | last post: by
4 posts views Thread by randy1200 | last post: by
9 posts views Thread by Christopher Carey | last post: by
2 posts views Thread by John Dann | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.