2

I have dynamic elements that I would like to flow downward and fill over multiple columns (like in Word, for example) rather than float left or right or stack in the typical manner. Are there any functions of CSS that make this possible? If not, what course of action can I take here?

1
  • Are you talking about something like a newspaper layout? I know there are jquery plugins that will do that for you. Commented Jan 12, 2010 at 22:42

3 Answers 3

5

It's possible but only in CSS3, which does not have the required market share yet to be used safely.

Check this article on Zen Elements for details.

A workaround until CSS3 is "mainstream" could be a Javascript/JQuery based solution like this one: Columnizer jQuery Plugin

Sign up to request clarification or add additional context in comments.

2 Comments

Excellent. I was always afraid to delve into jQuery but I was silly to think it would be complicated! Very easy and great examples. Thanks.
Broken link for Zen Elements
2

what about an <li> that is floated left and display:inline-block ?

3 Comments

I think you may be on to something here. Is it possible to split the items into multiple columns automatically?
yes, if you set a width of the items and a height of the container div. they should fill in correctly
@mkoryak It is indeed possible to emulate columns that way but the order is wrong. Columns are expected to build up from top to bottom and then sideways, not the other way around.
1

CSS3 makes it possible (explanation/description here), but it's not widely supported yet: only recent versions of Firefox and Safari (as well as other webkit-based browsers, probably) support it.

JavaScript is your best bet if you absolutely need this to be flexible and general. If you're doing it just for one specific piece of text, you could also hard-code it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.