This is a discussion on "body font size problem" within the Web Page Design section. This forum, and the thread "body font size problem are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
body font size problem
|
||
| Notices |
![]() |
|
|
LinkBack (1) | Thread Tools |
|
|||
|
body font size problem
Hi all
I am just putting together a simple CSS for my site (which is table based). At this stage i would like the text to be arial, blue and 12px (or approx 0.8em). i have put the following into my style sheet: body { font-family: Arial, Helvetica, sans-serif; font-size= 12px; color: #006699; } .bold {font-weight=bold; } and then linked it to the homepage. But i can't seem to get the font size to change. I can change the colour though so it must all be connecting ok. Am i doing anything glaringly obvious wrong? the code for the page is below Any ideas would be great Thanks Sam
|
|
|
|
|||
|
Re: body font size problem
Noticed the = , and amended it to : but still cant change the text size!
and the font weight amended too now. body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #006699; } .bold {font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #006699; } Last edited by Ryan Fait; Feb 20th, 2007 at 22:38. |
|
|||
|
Re: body font size problem
Hi karinne
I mean if i changed the font colour in the body parenthesis in my css, it changes the font colour accordingly in the body of my web pages. But if i try and change my font size in my css, it does change in IE but not in mozilla. I have got round it by using a td {fontsize: 12px} which I can change accordingly, which is ok but not my ideal solution. Any thoughts on why it wont change in the body parenthesis? Sam |
|
|||
|
Re: body font size problem
Am I wrong or does the order matter???
should it be body {12px Arial, Helvetica, san-serif; color: #006699; } |
|
||||
|
Re: body font size problem
font is shorthand Lchad. Check this out for an explanation of it
http://ryanfait.com/articles/2006/10...css-shorthand/ Can we have a link? |
|
||||
|
Re: body font size problem
Quote:
Once the element is styled, you don't need to put the complete font information in ".bold". You had it right the first time -- .bold {font-weight: bold;} is all you need. Using "px" as the font size is not the best way, because the two primary browsers treat it differently: FF will resize it but IE will not. "pt" is better if you don't want the user to resize it, and "em" or "%" if you do want them to resize it. Also, you should specify line-height if you specify font-size, for predictable results. I would do separate font-family, font-size, etc., if I were using a single stylesheet. Early IE versions (through 6.0) sometimes do strange things with the "font:" declaration. Last edited by masonbarge; Feb 21st, 2007 at 12:00. |
![]() |
| Tags |
| font sizing |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.webforumz.com/web-page-design/21777-body-font-size-problem.htm
|
||||
| Posted By | For | Type | Date | |
| Article Feed » body font size problem | This thread | Pingback | Feb 19th, 2007 20:21 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Font Size in BODY attribute | nne | Website Planning | 7 | Sep 11th, 2007 11:35 |
| side link tabs font size problem | paul1234 | Starting Out | 2 | Jan 11th, 2007 19:55 |
| Best way to define font size? | rubyfruit | Web Page Design | 11 | Sep 13th, 2006 13:58 |
| why h1 doesn't inherit font -size from body? | sahota | Web Page Design | 3 | Dec 12th, 2005 20:55 |
| font-size: does not work in <body> | andersonoo7 | Web Page Design | 4 | Jul 23rd, 2005 03:00 |