Forum Moderators: phranque

Message Too Old, No Replies

Constraining Font Sizes?

         

Chris_Coin

2:07 am on Sep 23, 2005 (gmt 0)

10+ Year Member



im looking for a way to constrain the font size on my web page, i noticed that when i view the pages on other pc's sometimes the font is larger and disrupts the whole look of the page.

thanks

Webwork

2:40 am on Sep 23, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I know you want your website to look like it looked on your monitor at design time but current design standards argue strongly for not attempting to constrain font size.

Your website looks different on other people's monitors because (in many cases) they have chosen to set font sizes that work for their vision, monitor resolution, ease of scanning, et.

Let the visitor decide: Use % not pixels or points.

Chris_Coin

4:05 am on Sep 25, 2005 (gmt 0)

10+ Year Member



thanks for the advise, but i still would like to restrain my font size. can anyone tell me how its done?

keyplyr

5:45 am on Sep 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use pixels to control the font size. Couple ways to do it:

- in <HEAD> section of webpage -

<style type="text/css">
font:13px
</style>

- Inline CSS -

<p style="font:13px">blah blah</p>

Change the number accordingly. There are other font attributes you will also want to identify such as font-family, color, bold/italic, etc. Do a few searches for "font css" or similar keywords and read up.

JKMitchell

8:22 pm on Sep 25, 2005 (gmt 0)

10+ Year Member



And then fall foul of the access rules - partially sighted people may need bigger fonts, have a look at the good design section on the RNIB site in the UK.

Chris_Coin

8:43 pm on Sep 25, 2005 (gmt 0)

10+ Year Member



it wont be a problem, the site will only get a small amount of traffic and it will be from young folks with good eyes, thanks again for the advise thou.

waziwazo

1:28 pm on Sep 29, 2005 (gmt 0)

10+ Year Member



I did not go under 12pt fonts on my websites except when there is something that i think peoples dont need to read.

katana_one

1:48 pm on Sep 29, 2005 (gmt 0)

10+ Year Member



Let's also not forget that using fixed font sizes does not work in all browsers. Firefox, for example, will still allow you to change the font size even if it has been "constrained" using any method.