Re: [WSG] Relative font sizes without relative dimension units

2004-06-21 Thread Bill McAvinney

What I'm looking for is a way to have a consistent em based measuring unit across all 
block elements in a site so that a width of say 10em will be the same  no matter what 
the font size of the text in that block is.

Here's a little demo using your example with each element given a left margin of 10em, 
and similar headers with my typical use of spans:
http://hurricane.mit.edu/erp_manuals/test.html

As you can see the way you're suggesting still gives an effective margin of 12em when 
the font size is 1.2em and 15em when the font size is 1.5em.

-- 
Bill McAvinney
Massachusetts Institute of Technology
Web Services
Administrative Computing, IS&T
617-258-6023

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
* 



Re: [WSG] Relative font sizes without relative dimension units

2004-06-05 Thread Felix Miata
Bill McAvinney wrote:
 
> I was being a bit loose with my words. I want sizing to be relative to
> the users font size setting (e.g. if they have their font size set for
> twice the default, I want my layout to be 2X what it would be at the
> default setting – screen real estate permitting), but not relative to
> my font size setting in that particular block element.

[ xx-small | x-small | small | medium | large | x-large | xx-large ]
http://www.w3.org/TR/CSS21/fonts.html#font-size-props
http://css-discuss.incutio.com/?page=UsingKeywords
-- 
"For since the creation of the world God's invisible qualities -- his
eternal power and divine nature -- have been clearly seen, being
understood from what has been made, so that men are without excuse."
Romans 1:20 NIV

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://members.ij.net/mrmazda/auth/

*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*



Re: [WSG] Relative font sizes without relative dimension units

2004-06-05 Thread Bill McAvinney
On Jun 4, 2004, at 7:33 PM, Patrick Lauke wrote:
The only way around it that I can think of is to do the calculation
of padding/margin based on your font size by hand.
In my example it's pretty straight forward. In the real world with 
inheritance, it is often prohibitively expensive to figure out just 
what the correct compensation is for each element. Automatic 
calculation and compensation by a RAD tool would be great.

On Jun 5, 2004, at 3:13 AM, Lea de Groot wrote:
If you want a consistently absolutely-sized block, then you'll need to
use a fixed size font-size unit (errr...) such as px.
I was being a bit loose with my words. I want sizing to be relative to 
the users font size setting (e.g. if they have their font size set for 
twice the default, I want my layout to be 2X what it would be at the 
default setting – screen real estate permitting), but not relative to 
my font size setting in that particular block element.

In other words if the user wants smaller or larger text I want my 
design to adjust to match, but I don't want the design (i.e. margins, 
widths, etc.) to be 50% larger in the places where my text is 50% 
larger.

Bill McAvinney
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*


RE: [WSG] Relative font sizes without relative dimension units

2004-06-05 Thread Patrick Lauke
>so it doesn't make any sense to measure it other
>than relative to the current size
 
actually, it does make a lot of sense, as the original poster
wants the whole measurements to be relative, but all
based on a unified measure, not the current size of the
current element.
 
P
<>

Re: [WSG] Relative font sizes without relative dimension units

2004-06-05 Thread Lea de Groot
On Fri, 4 Jun 2004 19:50:54 -0400, Bill McAvinney wrote:
> What I'm looking for is a way to have a consistent em based measuring 
> unit across all block elements in a site so that a width of say 10em 
> will be the same  no matter what the font size of the text in that 
> block is.

Unfortunately, this doesn't even make sense.
If you want a consistently absolutely-sized block, then you'll need to 
use a fixed size font-size unit (errr...) such as px.
em is a relative unit, so it doesn't make any sense to measure it other 
than relative to the current size.

I don't think I've made any sense either, but it is Saturday :)

Lea
-- 
Lea de Groot
Elysian Systems - I Understand the Internet 
Web Design, Usability, Information Architecture, Search Engine 
Optimisation
Brisbane, Australia
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
* 



Re: [WSG] Relative font sizes without relative dimension units

2004-06-04 Thread Bill McAvinney
What I'm looking for is a way to have a consistent em based measuring 
unit across all block elements in a site so that a width of say 10em 
will be the same  no matter what the font size of the text in that 
block is.

Here's a little demo using your example with each element given a 
left margin of 10em, and similar headers with my typical use of spans:
http://hurricane.mit.edu/erp_manuals/test.html

As you can see the way you're suggesting still gives an effective 
margin of 12em when the font size is 1.2em and 15em when the font 
size is 1.5em.

--
Bill McAvinney
Massachusetts Institute of Technology
Web Services
Administrative Computing, IS&T
617-258-6023
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
* 



RE: [WSG] Relative font sizes without relative dimension units

2004-06-04 Thread Patrick Lauke
Bill,
 
funnily enough, this is a problem I've come across recently myself.
The only way around it that I can think of is to do the calculation
of padding/margin based on your font size by hand.
 
In your example, if you want a 10em margin around your h1, but
you've already set your h1 to 1.5em font size, then set the margin
to 6.66em.
 
e.g.
 
#content p { font-size: 1em; margin: 10em; }
#content h1 { font-size: 1.5em; margin: 6.66em; }
 
Tedious, but the only clean way I can see without cluttering the
markup with extra non-semantic containers...
 
Patrick

Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
NŠÇ.²ÈžX¬µú+†ÛiÿünËZÖvÈ+¢êh®Òyèm¶ŸÿÁæìÝj·l‚º.¦Šàþf¢—ø.‰×Šw¬qùŸ¢»(™èbžÛ(žš,¶)àazX¬¶­¶)à…éi

Re: [WSG] Relative font sizes without relative dimension units

2004-06-04 Thread s2art
I could be wrong here but don't you just need to use descendant 
selectors here?
#header h1{font-size: 1.5em;}
#content h1{font-size1.2 em; font-color: red;}

On 05/06/2004, at 1:13 AM, Bill McAvinney wrote:
The solution I've come up with is to enclose non-1em sized text in a 
span tag and assign font size values with a contextual selector (e.g. 
h1 span {font-size:1.5em}). The problem with this solution is that it 
means adding quite a few semantically meaningless tags.

Anybody got a better idea?
*
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*