On Mon, Feb 25, 2013 at 11:48 AM, Laura Valentino <[email protected]> wrote:
> I'm trying to wrap my head around how to use percentages inside a container > specified in ems...or is this a bad idea? I used ems to specify the > max-width of the main container, as I think this will limit the upper width > while still allowing downwards fluidity. Inside the container are 2 floated > columns, with widths specified in percentages. I thought the percentages > should add up to 100% (of the container)...but this doesn't work. It works > with one column set at 60% and the other at 30%. What's going on here?? > > the site: > http://kvikna.com/testing/ieeg/ > > the relevant code: > #container { > position: relative; > max-width: 62em; > margin: 0 auto 0 auto; > } > > #main { > padding: 3%; > float: left; > width: 60%; > } > aside { > float: right; > width: 30%; > padding: 10% 3% 1% 1%; > } > > Thanks! > > Laura V. > Working for me in Mac Chrome (latest release). Try adding div{box-sizing: border-box;} and also I usually leave some wiggle room and not have widths add up to exactly 100%. HTH -- Tom Livingston | Senior Interactive Developer | Media Logic | ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
