I was just wondering, how do you link a DIV? I'm using a DIV with a background as my page header. The thing is that I'd like to use my header as a clickable link to my index.html page. I guess what I'm trying to say that is it possible to link just the background of the DIV, not the whole content?
Code can be found here:
<!-- m --><a class="postlink" href="http://www.kolumbus.fi/knuutila/audor/index.html">http://www.kolumbus.fi/knuutila/audor/index.html</a><!-- m -->
If I'm approaching headers from a wrong direction (standards/semantic wise, please correct me.)
Thanks,
- nasu<div ... onclick="window.location='index.html'">
But you probably don't want to do that if there is anything in the DIV that is already linked.Forgive me if im wrong but im i right in thinking that you cant do this legally(valid) <a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div></div></a>
Im sure its wrong but im still unsure<a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div></div></a>
It's invalid; block element within an inline element is not allowed.Just what i thought fang but thanks for clarifying it.
Cheers<h1><a href=http://www.webdeveloper.com/forum/archive/index.php/"page.html">Header</a></h1>
h1 a
{ display: block;
}
Code can be found here:
<!-- m --><a class="postlink" href="http://www.kolumbus.fi/knuutila/audor/index.html">http://www.kolumbus.fi/knuutila/audor/index.html</a><!-- m -->
If I'm approaching headers from a wrong direction (standards/semantic wise, please correct me.)
Thanks,
- nasu<div ... onclick="window.location='index.html'">
But you probably don't want to do that if there is anything in the DIV that is already linked.Forgive me if im wrong but im i right in thinking that you cant do this legally(valid) <a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div></div></a>
Im sure its wrong but im still unsure<a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div></div></a>
It's invalid; block element within an inline element is not allowed.Just what i thought fang but thanks for clarifying it.
Cheers<h1><a href=http://www.webdeveloper.com/forum/archive/index.php/"page.html">Header</a></h1>
h1 a
{ display: block;
}