View Full Version : Max text size wih CSS
timmillwood
Apr 2, 2007, 11:00 AM
I want to have the name of my website at the top of the page in large text rather than a graphic so that it loads quicker and is viewable if graphic are turned off.
The only problem is that if the user selects to have a larger or smaller text size in their browser it messes up the website.
it is possible to set a min and max text size so the user cannot change it.
epochblue
Apr 2, 2007, 11:07 AM
Define a base-font size in your body { } block, and use ems everywhere else so the page will look roughly the same everywhere.
However, I don't think anything you do will prevent the user from being able to change the size of their browser's text if they don't like what you've given them.
Sdashiki
Apr 2, 2007, 11:08 AM
it is possible to set a min and max text size so the user cannot change it.
AFAIK this is impossible and also a big no no in the HTML/CSS world.
People WANT to be able to change font sizes to suit their needs, and many developers will definitely balk at you for trying to lock people down.
If you want it a certain size, make it an image. Otherwise, there is no way to truly lock a font size. It sucks, but it does make total sense in the web.
tutubibi
Apr 2, 2007, 11:12 AM
Deleted!
timmillwood
Apr 2, 2007, 12:12 PM
I dont mind users changing the main text size, it is just the title.
I guess i can't have the best of both worlds. It's either fast load times and shows title when images are off.... or .... slower load times and use image with alt tag for when images are off.
epochblue
Apr 2, 2007, 12:16 PM
Unless the image you're using is of ludicrous resolution, your load time shouldn't be dramatically different if you use the image or not.
Sdashiki
Apr 2, 2007, 12:18 PM
Broadband is here to stay.
Who is your audience?
For instance, my current work is being done on a site that needs to cater to EVERYONE worldwide regardless of anything else.
You, on the other hand, may only be showing to techsavvy people or a certain clientele, in which case you can best guess their computers/internet connection specs.
jsm4182
Apr 2, 2007, 02:06 PM
in the css define the size of the font in pixels. That is frowned upon but should be ok just for the header.
elppa
Apr 2, 2007, 07:36 PM
Good Browsers (i.e. not IE) will scale text in pixels with no worries, so that is only a partial solution.
radiantm3
Apr 2, 2007, 10:35 PM
Good Browsers (i.e. not IE) will scale text in pixels with no worries, so that is only a partial solution.
IE7 scales px as well now.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.