...

View Full Version : css bullet link



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

rmedek
12-27-2005, 08: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?

esthera
12-27-2005, 08: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??

rmedek
12-27-2005, 08: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.

esthera
12-27-2005, 09:00 AM
.mainlistz {
list-style-image:url(tbullet.jpg);
vertical-align: super;
}

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

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


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

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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum