473,224 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Place icon on left of tag


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.


Oct 24 '07 #1
1 2748
shapper wrote:

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,

Oct 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Roedy Green | last post by:
I want to set up links to photos marked with camera icon. I would like it if I could replace code like this: <a href="images/roedy.jpg"><img src="images/camera.gif" width="29" height="24"...
by: Bernie Yaeger | last post by:
I now know how to gather the file type icons and I'm able to use them in a listview. But a listbox does not have a .smallimagelist or .largeimagelist member, so I don't know how to translate that...
by: Zeljko | last post by:
Hi, I have a form with a tray icon. However, when I minimize the form, it stays visible - not in the task bar (I have showintaskbar property set to false), but in a form of a rectangle sitting...
by: Just D. | last post by:
All! Who knows how can I change the form image (left top corner)? I can add bmp and ico images as resources to the Windows Application Project and if I create a link on the desktop I see this...
by: Benny Raymond | last post by:
I've written a class that inherits from MenuItem which displays icons next to the items in a menu... The only problem I'm having is that I have no clue how to turn these icons greyscale if they're...
by: Lespaul36 | last post by:
From what I have read, there isn't really a converter to icon format..it becomes a png file. I tried: 1: Dim bmp As Bitmap = CType(Bitmap.FromFile("C:\myfolder\file.bmp"), Bitmap) 2: ...
by: randy1200 | last post by:
I have a Windows application that previously had the company logo "MyCompany.ico" added to the upper left-most corner. The company has since issued a new version of "MyCompany.ico" that looks...
by: Christopher Carey | last post by:
I'd like to be able to control the icon presented in the upper left corner of the browser dynamically, based upon the page I'm serving. Is there a way to do this?
by: John Dann | last post by:
I'm struggling to add an icon to my VB2005 program. I've pointed to the icon I want to use in Project | Properties, the icon itself appears alongside the icon path and the icon file has been copied...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.