Can you make a CSS <header> element into a link?

background-image, css, html, styles

Solution

Background images are not linkable. The "proper" way to go about this would be to have an `<a>` element that has the appropriate `href`, and put the `background-image` to that. Use CSS to make the `<a>` tak up the needed space.

Problem

I have a site that has a `<header>` which is styled so that the header graphic is the `background-image`. I would like to have the header link to the home page. Is there an elegant way to do this that will allow me to keep it as a header with a `background-image`? CSS: ``` #header { background-image: url('../images/header.jpg'); height: 144px; display: block; } ```

Original source

Related problems