Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- div, css and columns
October 6, 2005, 10:24 pm
rate this thread
i need a way to display these structures in two parallel columns (somewhat
like the result of:
[contents of first div structure]
[contents of second div structure]
is this possibile using *only* the css styles? If so, how can i *vertically*
align these div structures? (they must start in the same row)
Re: div, css and columns
Yes, because CSS applies to tables as well as <div>s.
However it's _not_ possible to generate the exact presentation just by
using two <div>s as you have here. A table is composed of cells within
rows. The two <div>s each containing a list is composed of two columns
that each contain cells (like newspaper columns). You'll find it hard
to control vertical alignments. If this isn't a problem for this
example, then follow Mark's advice with the floats.
I'd suggest keeping the <table> and applying CSS to that. If you have
"content" that really needs to be aligned in rows like this, then IMHO
that's a reasonable justification for regarding it as a "data table".
It's also possible to apply "table CSS" to non table HTML markup. This
was really developed as an idea for rendering XML (not HTML) purely
with CSS and making it look like a table. XML/CSS turned into a bit of
a dead end and so the whole idea has never been widely implemented
(i.e. don't use it).
- » Re: Buck-KOOK and Jadalous are in the same sinking boat
- — Previous thread in » HTML Markup Language