View Text Size Issues in Firefox

liunx

Guest
I have a text resizing issue. I changed all my code over to semantic h1, h2 etc instead of the individual divs for each thing, and I really like it.

I have some text on the top of my page that I do not want to get bigger when the person enlarges the text, as it is already really big...it's a title. I found out by accident that I can keep text from enlarging in IE by assigning points vs ems as shown below. The "problem" arises in Firefox...the text grows up too big and wraps and looks bad. It works great in Opera though...

If anything I would have expected a problem in IE, but maybe it likes my bad coding...can someone tell me the right way to selectively allow text to be enlarged when someone uses control + ? CSS is inline for troubleshooting only. Thanks! :)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head><style type="text/css">
h1{
font: 38pt Arial, sans-serif;color:#e9c62a;
margin: 0 auto;background-color:#ffffff;
letter-spacing: 8px;text-align:center;padding-top:15px;
}
h2 {
font: 18pt Arial, sans-serif;color:#333;background-color:#ffffff;
letter-spacing: 0px;margin: 0 auto;text-align:center;padding-bottom:15px;
}
h3 {
font:.9em Arial, sans-serif;font-weight:bold;color:#faa71b;
background-color:#ffffff;text-align:left;margin-left:210px;margin-right:80px; margin-bottom:0px;
}

</style></head><body>

<h1>I don't want These<span style="color: #faa71b">Words</span></h1>
<h2>to expand in Firefox...but they do.</h2>
<h3>I do want this text to get bigger (cntrl-+)...and it does so correctly.</h3>
</body></html>First and foremost, if a user increases their text size, it means they can't read your text. Not allowing IE-Win users to increase their text size is a violation of a user's control of their computer. Internet Explorer shouldn't even allow that. You want people to read your site, so let them resize text as they see fit.

Secondly, IE-Win is the only browser that prevents users from resizing their text. There is no way to do it in any other browser.

The challenge is to design pages the are flexible enough height-wise so that increased text sizes don't break the layout. That means, if any box on your page will contain text, do not give it a height. Just let it flow.I agree in theory...but still want the work-around. The text in question is a banner title (h1) with a size of 38pts, and a subheading (h2) of 18pts...I just want them to stay 38pts and 18pts. The body text of the page (h3) is resizeable from 0 points to anything they want it to be...I just want the title to stay still so it looks right....whatever that is. :)

I completely agree with what you're saying though...thanks for the input...But you missed the answer to your question: You can't prevent non IE-Win browsers from resizing the text. Even IE5-Mac allows you to change the font sizes. You just can't prevent it. It really all comes down to you setting the font sizes to how you want them to look by default. Just don't sweat it too much when a user increases their text size. It might look ugly to you, but they can read it. And to them, that's all that counts.

... Although I can see why you'd want to prevent them from increasing a 38pt font. Generally speaking that's plenty big, and a couple Ctrl + in Firefox and you'd get giamundus text (pronounced jie-mun-duss :D).Only option I know of is to make the H1 text into a graphic, put it inside the H1 tags, then be sure to replicate the text with the ALT attribute for non-graphical browsers:

<h1><img src=http://www.webdeveloper.com/forum/archive/index.php/"title.png" alt="My Title" height="50px" width="200px"></h1>Thanks to both of you...you're right I missed the answer :) I should have increased my text size and read more carefully ;)

Thanks again...good idea on the graphic...I may try that out.Use em's instead of pt or px.You can't prevent anyone with IE on Windows (as with all other browsers) from creating a user stylesheet and making the web page appear the way that they want it to.Gotcha...i've never met someone that actually does that...but definitely believe that people do. Thanks all.
 
Back
Top