Previous Message
Next Message

Change of font-size in div affects div height

Sent by Gunlaug_Sørtun on 4 December 2007 02:02


Ian Young wrote:

> 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>

regards
	Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
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: