Skip to main content

Top reasons your CSS columns are messed up - Warpspire

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Bookmark History

Saved by 39 people (-9 private), first by anonymouse user on 2008-05-14


Public Sticky notes

Your margins are doubled in IE6

Highlighted by burnhard

Easy fix: add display:inline; No side effects in any browser, and IE6 obeys margins perfectly.

Highlighted by burnhard

.sidebar{ float:left; margin-left:20px; display:inline }

Highlighted by bluecockatoo

.columns{ width:500px; } .columns .main{ float:left; width:400px; overflow:hidden; } .columns .sidebar{ float:right width:100px; overflow:hidden; }

Highlighted by bluecockatoo

Your margins extend past your container

Highlighted by burnhard

The fix? Apply a left margin to each item, with a negative margin to the wrapper.

Highlighted by burnhard

ul.listing{ margin:0 0 0 -20px; width:420px; } ul.listing li{ list-style-type:none; float:left; margin:0 0 0 20px; width:85px; }

Highlighted by bluecockatoo