Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How do I link an entire <div> or <li>? Re: How do I link an entire

or
  • ?

  • #56823
    Chris Coyier
    Keymaster

    Yeah I would avoid wrapping DIV’s or LI’s or any other block level element in an anchor. Anchors are inline elements, and that can cause weird results. Even if you redeclare them as block level, that doesn’t help much with CSS off.

    Your best bet, like The Doc kinda said, is just to put all the stuff inside the anchor to begin with, and if you need internal tags, use spans.