CSS image to link to website.
Posted: 24 February 2011 01:47 PM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2011-02-21

I have the following CSS code on my site;

Code:

{
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 600px;
  height: 290px;
  background-image: url(‘images/header.png’);
  background-repeat: no-repeat;
  background-position: center center;
}

What code do I need to add to link this image to a certain web address?


Thanks & Regards
Manish

Profile
 
 
Posted: 10 January 2012 08:59 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  23
Joined  2010-07-23

You can try this following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html>
<
head>
<
style type="text/css">
img.home
{
width
:46px;
height:44px;
background:url(img_navsprites.gif0 0;
}
img
.next
{
width
:43px;
height:44px;
background:url(img_navsprites.gif) -91px 0;
}
</style>
</
head>

<
body>
<
img class="home" src="img_trans.gif" width="1" height="1" />
<
br /><br />
<
img class="next" src="img_trans.gif" width="1" height="1" />
</
body>
</
html

Certified translation

Profile