Previous Message
Next Message

Change of font-size in div affects div height

Sent by Ian Young on 4 December 2007 08:08


> > Odd thing happened here. Added font-size to a div and it changed the
> > height of the cell (and other surrounding). If I change from ems to
> > px for the div height it is ok in that div but others with height in
> > div are affected.
> >
> > I have not come across this before.
>
> That there's a difference between 'min-height: 31em' based on (near)
> default (100.1%) and same 'min-height' based on 12px, isn't surprising.
> An 'em' is a relative unit, and when you change the value it's
> calculated from the 'em' itself will of course change height.
>
> Are you sure you didn't really want to set font-size on the content of
> the div and not on the div itself?
>
> Example: <http://www.gunlaug.no/tos/alien/iy-1/test_07_1204.html>
>

Thanks Georg

As ever, a very elegant solution.
This is what I like about CSS. There is always something new to learn.

Cheers

Ian
IY e-Solutions
http://www.iyesolutions.co.uk

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.13/1165 - Release Date: 02/12/2007
20:34

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/
Previous Message
Next Message

Message thread: