Previous Message
Next Message

Re: [css-d] A tight fitting border on centered text?

Sent by scott mcleod on 5 December 2002 08:08


>div { margin-left: auto; margin-right: auto; text-align: center;}
>h1 { text-align: center; border: 1px solid green; width: 6em; padding: 5px; 
>}
>
>
>This (and variations thereof) will probably be the best solution you'll
>find. - Brandon Oto

If that is the case, then what is the best approach for trying to guarantee 
that the width I begrudgingly must give is wide enough to include all of the 
(one line) text (and padding) without losing the original intent of it being 
a "tight fitting border"?  That is, assuming different potential fonts will 
be used on different platforms, are there suggested width units I should use 
(perhaps em or ex) and should I run through all of the fonts on my 
font-family list and use the widest of them as the standard?  Seems like 
there ought to be a better way (beside the fact that I can't possibly 
anticipate what the generic font family might result in). Would 
font-size-adjust be helpful here (and is there any browser support for it 
anyway?)

Thanks,

-- Scott McLeod


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

_______________________________________________
css-discuss [EMAIL-REMOVED]]
http://two.pairlist.net/mailman/listinfo/css-discuss
Sponsored by www.westciv.com - CSS resources | software | learning
Previous Message
Next Message

Possibly related: