1 reply [Last post]
deap82
deap82's picture
Offline
newbie
Stockholm
Last seen: 7 years 30 weeks ago
Stockholm
Timezone: GMT+2
Joined: 2013-05-05
Posts: 1
Points: 2

Hi,
Is there any way I could accomplish what I'd like to call a vertical stackpanel with html and css without changing the html structure of this sample:

http://jsfiddle.net/bEgAg/

The desired behaviour is that "Item 4" in the sample should jump up and be displayed next to "Item 1". The container could change in size and items should always fill up vertically as long as there is room, and then start a new column to the right.

Ideally I'd like a CSS only solution to this, next best would be an existing javascript solution that I suppose would inspect the elements sizes, listen to any size changes and inject additional markup to left float each column. Third best is that I will have to write that javascript solution myself... Wink

Any input to this problem is appreciated.

/Dan

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 hours 33 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

Multicolumn?

Check out the CSS Multi-column Layout Module.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.