Format a list into multiple columns, or dynamically display columnsusing CSS?

S

Steve

I'm sure this question has been asked before, but I couldn't seem to get
the right combination of words to get a hit.

I'm looking to do one of two things...

1) Take a list of items, and have them display in a table format, but
without any predetermined number of columns. Meaning that somehow using
CSS tell the browser to determine the amount of screen space available,
and then adjust the list items into an appropriate number of columns,
all lined up nice and pretty.

2) Similar to #1, take a list of items, and display them in a
predetermined number of columns.

If this is a FAQ, or documented in the CSS spec, please just point me to
the proper links and I'll take care of the rest of the reading myself.

Thanks,
Steve
 
M

Mark Parnell

1) Take a list of items, and have them display in a table format, but
without any predetermined number of columns. Meaning that somehow using
CSS tell the browser to determine the amount of screen space available,
and then adjust the list items into an appropriate number of columns,
all lined up nice and pretty.

float: left;
2) Similar to #1, take a list of items, and display them in a
predetermined number of columns.

Much nicer to let it flow - you have no way of knowing how many will fit
across my screen.

Anyway, use float as above, then you could put a <div> around each x
items, or clear: left; on the one you want first on each line. Bit
awkward either way. #1 would be better anyway. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top