Jump to content

I want text to resize as I stretch the browser screen...


rxbanditboy1112

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.