StuffIKnowAboutComputersAndTheWeb > Make Enclosing Containers Expand To Surround Their Children Elements
If you've created several CSS-only layouts, chances are you've tried to make one that looks like this:
-----------
| --- --- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| --- --- |
-----------
It probably ended up blowing up in Firefox. Sad!
What you need to do is modify your layout so you need a footer:
-----------
| --- --- |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| --- --- |
| |-----| |
| |-----| |
-----------
The footer should have the following style:
{clear: all;}
(it can have any other style you like, and of course you can name the element whatever you like, just it must have the clear: all; directive.)
Easy, huh?
This page last modified on October 21, 2006, at 07:09 PM
This work is licensed under a Creative Commons License
