Forum Moderators: open

Message Too Old, No Replies

Text Size

How do you restrict your text size to stay small

         

seekingresults

3:46 pm on Oct 31, 2002 (gmt 0)

10+ Year Member



What <HTML> commands can be used to restrict your text size so that when users visit your site and change the text size value in their browser, the site will not be altered and images will not be shoved around.

tedster

7:16 pm on Oct 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, seekingresults.

This is a relatively complex area. You can get the results you describe with Cascading Syle Sheets - at least to a degree - by setting font size in pixels. It is still possible that some users will override, however, if they have set up their own stylesheet. The people who do this are often visually challenged in some way, so relax about that.

The best practice is to strive for a layout that is fluid and accepts resizing of the font without breaking down, but I understand that sometimes there are practical restraints on doing this in a given situation.

If you use the "Site Search" function at the top of the page and look for "font size" you will uncover a treasure trove of information and conversation in this area.

choster

11:45 pm on Oct 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As tedster notes you can fix font sizes by using absolute units-- pixels, points, picas, centimeters-- in your stylesheets, but a user can always override your settings in his or her browser preferences or by turning off stylesheets completely. The same goes for colors.

I'd note as well that font sizes render differently on different platforms and in different browsers. A given typeface will often look smaller on a Macintosh and larger on a Windows PC, and of course Mozilla/Netscape 6.x, IE, and Netscape 4 are all slightly different in their calculation of pixel space and font sizes. The only absolute way to make every pixel appear in the same place every time is with graphics.