Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Table-like behaviour with CSS
April 28, 2008, 3:45 pm
rate this thread
(please read this message using fixed-font)
I'm writting a website with boxes of content. The number of cells in
each row might change depending on the browser window size, and the
content will be something like this:
AAAAA BBBBB CCCCF
DDDDD EEEEE FFFFF
I'm trying to use this box model in CSS:
margin: 0 10px 10px 0;
It works, but the problem is that I don't want a fixed height, I want
the height to auto adjust (pretty much like a table in HTML).
If I remove the height attribute, I get something like this:
AAAAA BBBBB CCCCC
DDDDD BBBBB FFFFF
Please help me! What can I do to get the first behaviour?
Thank you in advance!
Re: Table-like behaviour with CSS
You cannot. You cannot specify a "virtual grid". You either have to set
a fixed height to accommodate your max content and have the floats line
up their tops as they create their virtual rows to the available window
width. Or you will have to set a fix number of "cells" per row and use
clear, no advantage over table.
LITTLE WORKS STUDIO
- » IE bug/issue with changing the frameset properties through DHTML
- — Previous thread in » HTML Authoring Forum