How do I justify these DIVs, but line them up?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

How do I justify these DIVs, but line them up?

Post by simonmlewis »

http://jsfiddle.net/thirtydot/EDp8R/

This works really nicely. But, when there are just 2-3 on the next row, it's terrible.

So I want it to justify when it's a full fow of six, but when it's less, to just line up like a 'float'.

Any nice way of doing that?
I did try doing it with margins, and on the sixth DIV, have no right margin, but even then it can never be perfect.

So I want each row to be justified to left and right, but also... to line up!
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply