HighDots Forums  

font size relative to "top level" font size

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss font size relative to "top level" font size in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Achim Domma (SyynX Solutions GmbH)
 
Posts: n/a

Default font size relative to "top level" font size - 12-14-2005 , 05:16 AM






Hi,

is there a possibility to set the font size to a percent value of the
"top level" font size?

For example:

The font size of the body might be 100% and I have a div which should
have a font size of 80% of this value, independent of other tags around
this div:

<body style='font-size: 12pt'>
<div style='font-size: 90%'>
<div style='???'>text with a size of 80% of 12pt, independent
of the 90% of the parent div</div>
</div>
</body>

regards,
Achim

Reply With Quote
  #2  
Old   
Stan Brown
 
Posts: n/a

Default Re: font size relative to "top level" font size - 12-14-2005 , 10:02 AM






Wed, 14 Dec 2005 12:16:30 +0100 from Achim Domma (SyynX Solutions
GmbH) <achim.domma (AT) syynx (DOT) de>:
Quote:
is there a possibility to set the font size to a percent value of the
"top level" font size?

For example:

The font size of the body might be 100% and I have a div which should
have a font size of 80% of this value, independent of other tags around
this div:
Nope -- no way. It would be useful in some circumstances, but each
element inherits its base size for %age calculations from its parent.
http://www.w3.org/TR/CSS21/fonts.html#propdef-font-size

CSS does have absolute font size like "medium", but you don't want to
use them because you have no idea what size the user has set up in
the browser.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.