css float - css four-column left floated layout with equal left and right margins -


i have four-column, left-floated layout. want equal margins left , right margins. i've floated 4 columns left , assigned right margin of 20px on each float. full width column div looks correct, margins , columns not displaying correctly on columns different widths. i've gone on math several times , eyes burning trying figure out i'm doing wrong.

any suggestions on best way or how this? create 20px width first column total of 5 columns, or use tables. looking more elegant way of doing this, maybe it's not possible. have support ie7. thanks.

code here - 4 column margins not correct

i guess problem css didn't take padding account.

in order more elegant should centred blocks equals margins.

i've inspected code , modified little :)

http://jsfiddle.net/w3yrf/5/

anyway, recommend use grid system such grid960 (http://960.gs/) give great hand on way!

cheers!


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -