| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
sanddancer
|
css/xhtml linkage
Probably really simple/easy but it's not validating with w3c the way I'm currently doing it. Ok, how do I go about linking an image, that is set as the background in the css. e.g. background: url(../images/marsbar.jpg); |
|
|
|
|
|
#3 (permalink) |
|
sanddancer
|
thats not really my problem, I want to know how to link from the image thats in the background. For example i have a div with an background image. Not having anything else but the background image in the div how do i then attach a link to it? I've been doing it this way: <a href="blahblah.html"><div id="moreblah"></div></a> It does make the entire DIV ino a link -- which is what I want, but its not allowed in the w3c? The link below is what im on about, the Download CV and email I want linked. Click Another thing, in the "respected" section, why does it mess up in IE?...I've tried sorting it but without success. Last edited by Scott : 18-07-2006 at 15:29. |
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Oh. <a> is an inline element, <div> is a block element. Inline elements may not contain block elements. Image replacement to the rescue! HTML Code:
Code:
|
|
![]() |