rxbanditboy1112 Posted July 5, 2007 Share Posted July 5, 2007 I tried using font-size: 1em, but i dont think that is it.... to clarify.... if the browser size becomes smaller i want text to shrink and if it becomes bigger i want it to enlarge.... Quote Link to comment Share on other sites More sharing options...
Philip Posted July 7, 2007 Share Posted July 7, 2007 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. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted July 7, 2007 Share Posted July 7, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.