Previous Message
Next Message

Can I put a link on an image in CSS?

Sent by Jochem Maas on 20 February 2006 17:05


Peter Snow Cao wrote:
> 

....

> 
> <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>

not with standing the FONT crap, why go to trouble of adding a 1x1 gif etc?
why not something like?:

<a id="header" href="index.html" title="Bike China Logo Link to Home"></a>

(which might still require a '&nbsp;' inside the link tag to make it
work in all browsers (incl. stuff like lynx)

the idea being that an 'A' tag is just as much an element as a 'DIV' tag
so you could style it identically. you'll need to set 'display: block;' in the CSS
for this header link because link tags don't display as blocks by default
(whereas DIV tags do)




> 
> 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/

______________________________________________________________________
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: