Hidden divs taking up space

Shaun Wilson picture Shaun Wilson · Apr 27, 2013 · Viewed 28.4k times · Source

I've set up all my navigation for my website as hide.show divs (using behaviours). It all works pretty well, but I've now realised the problem of the divs taking up space even when they're hidden, extending the height of my wrapper far too much.

I really want the height to extend and contract according to the amount of content on display.

http://shanuea.lockernerd.co.uk/camel/

The divs are absolutely positioned and set to visibility:hidden. Any help appreciated, please let me know if you need more info.

Answer

Stefan Haustein picture Stefan Haustein · Apr 27, 2013

Use display:none instead of visibility:hidden if you want the divs to take up no space when they are not displayed.