Ajay Patel
Ajay Patel

Reputation: 5418

Div arrangement problem

all

I am creating my menu list in footer dynamically. now in one row max 3 div can be possible then next 4th div will be set under first. My problem is now the above 3 div has different height. while creating the 2nd row its take the 1st row max height.

see the image you will more clear what i want

enter image description here

Upvotes: 0

Views: 212

Answers (2)

d-live
d-live

Reputation: 8036

Instead of laying out the divs rowwise lay them columnwise. Have 3 container divs representing columns then place content divs inside these column divs as appropriate.

The table equivalent would be - outer container table having one row and three cells. Each cell would have single column, multi row table.

Upvotes: 1

thirtydot
thirtydot

Reputation: 228162

jQuery Masonry is an option to solve this, though possibly overkill for your reasonably simple situation.

Is the width of that brown box fluid or fixed?

Upvotes: 3

Related Questions