> "How do you set an image link" > "when calling the image as a background in css."
Do you mean, create a link, with a background image? If so, you can declare the background image (as SmileMagician has done above) but for your <a> tag.. An example would be:
a#my_img_link
{
background-image:url('/../
width:200px;
height:50px;
display:block; /** This line allows the width and height declarations to take effect **/
}
a:hover#my_img_link /** What to do when the user hovers over the link **/
{
background-image:url('/../
}
You can then use it like so:
<a href="#" id="my_img_link">Some Text</a>
Obviously, you can also declare any other attributes necessary, within the CSS dec; such as font color, size, etc..
Main Topics
Browse All Topics





by: SmileMagicianPosted on 2005-07-20 at 01:27:28ID: 14482336
Heres an example:
/images/bg .gif) no-repeat top right;
body {
background: white url(http://www.webpage.com
}
So theres a few variables in that example as well. Repeating the image, where to put it on the screen, etc.
If in case your were referring to a link like "a href" type, as far as I know it isn't possible with background images. Cheers!
SmileMagician :)