0

I used the following solution to create 3 divs next to each other: Fluid width with equally spaced DIVs

However, when I wrap each box inside an <a> tag with display:block the entire layout gets funky.

Is there a way around this? The fluidity (is that even a word?) is not really necessary, but preferable. The reason I used it this solution is because it keeps boxes neatly next to each other even in IE6/7 and for the sake of simplicity too.

Thanks in advance!

Community
  • 1
  • 1
Nick
  • 2,862
  • 5
  • 34
  • 68

1 Answers1

1

You cannot wrap a div with a - and if I am understanding you correctly this is where your problems start.

If you want to make your entire div clickable, place a link inside your div around some text/a title/whatever and use jQuery to action this link if you click ANYWHERE inside the div

$(".divClass").click(function () {
    window.location = $(this).find("a").attr("href");
});
Alan Shortis
  • 1,277
  • 3
  • 18
  • 35