Jump to content

Recommended Posts

Why would you want to do this? Here's an example I found earlier, quoted:

 

What does that mean for your fonts on a 3" PDA screen or a 90" projection screen? How do you even know the

physical size of the viewing area?

 

Don't set absolute font sizes, but use relative sizing with 100% as the

main content text size. That way, the user gets the font size (s)he wants.

font-size: 1.0em just means that the text will have the width of one "m" (yes the character m) for the font size that you define. Usually, when I use em, I define a size in my *, html, or body declaration, and using em will make whatever you apply it to relative to the size that you define at the top. So if you define the font size to be 12px, and then a h1 tag to use 2.0em, the h1 tag characters will be the width of 2 'm' characters at 12px. Does any of that make sense?

 

I would like to know why you want to resize the text when the browser size changes. If you're just doing it for effect, I'm sure that there's some JavaScript out there to help, but if you're trying to accomplish something specific, maybe there's a better way to do it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.