Hi,
I've built a couple of websites and each time I come up with the ominous problem of using div's as columns. The simplest solution and the one I've found all over the web is to use floats like so:


___________________________________
|         |              |         |
|         |              |         |
|         |              |         |
|         |              |         |
|         |              |         |
|         |    stuff     |         |
| float 1 |     in       | float 2 |
|         |    middle    |         |
|         |              |         |
|         |              |         |
|         |              |         |
|         |              |         |
|__________________________________|

The problem is that the containing block, usually another div does not resise to fit the length of the right and left blocks because they are floated. So you get things like this:
___________________________________
| | | |
| | | |
| | | |
| | | |
| | | |
| | stuff | |
| float 1 | in | float 2 |
| | middle | |
| | | |
|_________|______________|_________|<--bottom of containing block
| | |_________|
| |
|_________|


This can gets impossible to work with if I want, say, a border around the whole thing, or particular backgrounds. I've figured out two 'fixes' to the problem, but neither of them are what I would like. The first is to put it in a table (which is useing a table for something it shouldn't be). The second would be useing javascript to fix it, but that isn't good either.
What is the proper way to do this kind of thing, or does css not properly support a format like this?
******************************************************
The discussion list for http://webstandardsgroup.org/


See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to