 |
 |
How to use CSS to lock font size
|
 |
|
 |
|
Forum Regular
Join Date: Jun 2003
Status:
Offline
|
|
With CSS is it possible to lock the font size in all browsers? So that if the user makes the font bigger via the browser the font won't get bigger (ie. for the navigation bars). IE for Windows does that, but coterie to believe not everyone is using IE on Windows.
If so, how is this done?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
using pt sizes or px sizes should do the trick. em's will change with the browser font size.
Example:
Code:
<p class="thisClass">Some text</p>
and then the css:
Code:
p.thisClass { font-size: 10pt }
Should also note that font PX size and pt sizes are different on different OSes and even different browsers for that matter. I find it is easier to find an appropriate size using pt rather than px for cross browser and cross platform pages.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status:
Offline
|
|
I don't know what browser you are using, but all of the ones I have tested don't do what you say they will with regards to pt and px. Going to View->Increase Text Size or the equivalent makes all of my text bigger, whether it was instantiated with px, pt, or em.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
Originally posted by iStudent 2003:
With CSS is it possible to lock the font size in all browsers? So that if the user makes the font bigger via the browser the font won't get bigger (ie. for the navigation bars). IE for Windows does that, but coterie to believe not everyone is using IE on Windows.
If so, how is this done?
This is a bug in IE, not a feature. Users are supposed to be able to make the fonts bigger and/or smaller; this is an accessibility issue.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by Millennium:
This is a bug in IE, not a feature. Users are supposed to be able to make the fonts bigger and/or smaller; this is an accessibility issue.
Just to take this further, if you want your navigation bars to still look good when resized, have the navigation bar resize as well. If you're not using text for accessibility then the only way to "lock the size" is to use images, which is bad practice.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |