Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
It would actually be kind of difficult to do. I haven't seen a good cross-browser grid example that uses CSS and floats (divs).
You'd have divs defined something like this though:
[code]
.gridrow {
clear: left;
}
.gridcol {
float: left;
height: 100px; /* You need this part or it doesn't work. That's what makes my example a bad one...if the person resizes text in FF or something and the height becomes greater than 100px, there are issues. */
width: 160px;
}
Code:
<div class="gridrow">
<div class="gridcol">...</div>
<div class="gridcol">...</div>
<div class="gridcol">...</div>
<div class="gridcol">...</div>
</div>
Lather, rinse, repeat.
I haven't seen a better way to do it myself, although I'd like to personally.
(For those about to suggest table-row and table-cell, IE6 and before don't support them so that's why they don't really apply, I don't think.)
Last edited by ADAM Web Design; 05-02-2006 at 10:50 AM..
|