Skip to content

Instantly share code, notes, and snippets.

@sgsheg
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgsheg/7f625c6cd150e8f4dad5 to your computer and use it in GitHub Desktop.
Save sgsheg/7f625c6cd150e8f4dad5 to your computer and use it in GitHub Desktop.
Make a DIV Into a Link

I am looking for an XHTML 1.1 valid way to make a DIV into a clickable link.

More better:

You can't make the div a link itself, but you can make an <a> tag act as a block, the same behaviour a <div> has.

a {
    display: block;
}

You can then set width and height on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment