Georg, you are awesome!
This is beautiful. Thank you.

Gunlaug Sørtun appears to have written the following on 3/13/07 12:26 PM:
> David Agnew wrote:
>> I'm having trouble centering list items within a div. I'm using % for
>>  width (fluid layout), and I don't mind if it's off by a pixel one 
>> way or another, but as the window narrows, the right margin for the 
>> list items shrinks far more than the left. This problem is in 
>> Firefox, I'm guessing it affects other browsers.
>
> You have a mix of pixel-paddings and percentage-width. Since paddings
> and borders are added to width - that's how the box-model works, your
> values will only add up on a single, ideal, width and can't take
> width-changes.
>
>> http://www.lighthouse.chtr.k12.ma.us/index.php
>
> Suggest you change to this...
>
> .features ul {
> padding: 0;
> margin: 0 4%;
> }
> .features li {
> list-style-type: none;
> border: 1px solid #540b13;
> color: #333;
> padding: 1px 2%;
> margin: 2px 0;
> }
>
> ...for perfect symmetry regardless of window-width.
>
> The "trick" is to only declare margins and paddings _here_ - in
> percentages or whatever, and leave the width-calculations to the
> browsers. Browsers are good at calculating the default (width: auto), so
> they should at worst get it 1px wrong.
>
> Don't worry - it is tested :-)
>
> regards
>     Georg

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to