This is a discussion on "A definative CSS Font Sizing" within the Web Page Design section. This forum, and the thread "A definative CSS Font Sizing are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
A definative CSS Font Sizing
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
A definative CSS Font Sizing
In looking for a clear, definative way to size fonts on a web page I have come accross hundreds of different methods to set up or start sizing fonts on a page....
In the past I have always set the body in the css to a percentage and then used 'em' values to change styles that are different from the normal page text size. Recently we have had to do a site with a strict 'doctype' and my previous methods no longer seem to be effective as no matter what I set the body % to be the sizing doesnt change. Put simply: body { font-size: 70%; font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif; color: #345A03; margin:0; padding:0; } h1 { font-size: 1.4em; color: #7EA626; font-weight: bold; } #smallerText { font-size: 0.9em; } ....... What should I be doing? Thanks. |
|
|
|
#2
|
|||
|
|||
|
Re: A definative CSS Font Sizing
not wuite sure what you mean, but you can use em's for sizes of divs aswell, as they then change size with the font
|
|
#3
|
|||
|
|||
|
Re: A definative CSS Font Sizing
I think it's just a doctype problem, I have looked on various css sites since and changed mine and the fonts act differently depending on the doctype whilst still using the css posted previously.
I was looking for a definative style sheet set up that I should use in future. I need to do some more research about the doctype I think and which ones to specify on my pages. |
|
#4
|
|||
|
|||
|
Re: A definative CSS Font Sizing
As well as the doctype, you need to look at the charset you are specifying as there may be an interaction there and also look at how your pages are being served up by the server, as html or xhtml.
Th basic principle use were using for font sizing was fine although I would set the body percentage higher so that it closely reflects any base font size that the user has set. You can find some info on this in the css sticky at the top of the forum. Last edited by ukgeoff; Oct 26th, 2006 at 17:20. |
![]() |
| Tags |
| css, font sizing |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sizing issues | galan98 | Starting Out | 6 | Apr 24th, 2007 15:27 |
| Misleading font sizing | ukgeoff | Web Page Design | 0 | Apr 19th, 2007 14:26 |
| Sizing of a page | enemeth | Web Page Design | 4 | Feb 13th, 2007 12:44 |
| layout sizing help | thadley | Web Page Design | 3 | Mar 7th, 2006 23:17 |
| Text/Font appearance & Sizing in photoshop 7 | autumn_whispers2me | Graphics and 3D | 3 | May 6th, 2005 23:04 |