Previous Message
Next Message

Can I put a link on an image in CSS?

Sent by Peter Snow Cao on 19 February 2006 04:04


Els wrote:

> Ah, didn't get you the first time. You can have an invisible gif
> in the <a> element, or even just a &nbsp; if you set the <a>
> element to display:block;. Just position this link with
> position:absolute; over the background image that's there. That
> way it won't mess up any of the rest of page layout.
> I'd choose a gif over an &nbsp; though, so you can make use of
> the alt text for people who surf without images, such as Lynx  or
> screenreader users. They wouldn't be able to 'see' the link if it
> were just a blown up &nbsp;.


I did this and it seems to work, but I don't get what I should do about
the "position:absolute;"

<body>

<div id="header">

<a href="index.html"><img border="0" src="images/invisible.gif"
width="130" height="124" align="left" alt="Bike China Logo Link to Home
Page" /></a>

<p align="center"><a name="top" id="top">Bike China Adventures,
Inc.</a><br/><em><font color="#FFFF00">Tour Schedule</font></em></p>

Thanks,

Peter
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: