wolfkin Posted June 22, 2009 Report Share Posted June 22, 2009 when I change my CSS from #left { float:left; width:700px; } to this #left { float:left; width:700px; padding: 0 1em; } my primary content column breaks. could someone help me see what's going on? http://userqqqq.123bemyhost.com/index.php Quote Link to comment Share on other sites More sharing options...
Andrea Posted June 22, 2009 Report Share Posted June 22, 2009 Adding the padding makes that div too wide. Instead of em, use px for it, and whatever you take, multiply by 2 and deduct from the width. For example: #left { float:left; width:650px; padding: 0 25px; } Quote Link to comment Share on other sites More sharing options...
wolfkin Posted June 23, 2009 Author Report Share Posted June 23, 2009 (edited) so the div doesn't includes the padding? if figured it would just squish everything in. bah. gripes aside that fixes my problem thanks much. Edited June 23, 2009 by wolfkin Quote Link to comment Share on other sites More sharing options...
BeeDev Posted June 23, 2009 Report Share Posted June 23, 2009 Padding and Margin is not usually included in a Block element's width and height. You have to count it in, and calculate how much space is left within the container to set for the next floated element. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.