In this method, we will insert a div above the content element. This will be set to height:50%;
and margin-bottom:-contentheight;
. The content will then clear the float and end up in the middle.
THE GOODS
- Works in all browsers
- When there isn’t enough space (ie. the window shrinks) our content will not be cut off, and a scrollbar will appear.
THE BADS
- Only one I can think of is that it requires an extra empty element (which isn’t that bad, another subjective topic)