I want to use an entire div as a link.. without the use of \"onclick\"
Is this possible with a simple href
?
Thanks
You can accomplish this by creating a small transparent PNG (say, 10px * 10px) and using CSS to set the width and height of the PNG to 100%. Then you can wrap the img
tag with your a href
tag.
Here's the HTML:
Here's the CSS:
#YourHeader img {
width: 100%;
height: 100%;
}
This is especially handy if #YourHeader
is an empty div
whose only purpose is to display a header image via its background-image
attribute.