View Full Version : css bullet link

12-27-2005, 08:33 AM
I have an image that's a bullet in css -- is there anyway in css to make that image a link?

12-27-2005, 09:41 AM
er, what?

Links are HTML. CSS only applies style to HTML. So to make anything a link, you wrap it in an anchor tag:

<a href="http://url.com">whatever</a>

Maybe you could be more specific?

12-27-2005, 09:45 AM
well teh bullet shows up from the css and i want the bullet to be a link -- i guess i need to change the list and put the image in html??

12-27-2005, 09:51 AM
i guess i need to change the list and put the image in html??
No, you need to be more specific and post some code of what you have so far. What bullet? A list-item bullet? My mind reading capabilities are slow this time of year.

12-27-2005, 10:00 AM
.mainlistz {
vertical-align: super;

but i want this tbullet.jpg to now be a link. should i remove it from the css?

12-27-2005, 10:11 AM
try making it a background image instead:

<li><a href="#">list item</a></li>

li a {
background: url (../images/bullet.gif) no-repeat left .5em;
padding-left: 1em;

Just an example, you'll have to play with the positioning a bit obviously. The idea is to insert the image as a bg image of the link itself and give it enough padding to look like a bullet on the left side.