This is a discussion on "why h1 doesn't inherit font -size from body?" within the Web Page Design section. This forum, and the thread "why h1 doesn't inherit font -size from body? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
why h1 doesn't inherit font -size from body?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
why h1 doesn't inherit font -size from body?
In adition to my previosu post I have one more query.
Why h1 doesn't inherit font-size from <body> If we specify font-size as 100% for <body> h1 is till displayed with default browser font size for h1. But I think it should be displayed with same font size as <body>. |
|
|
|
#2
|
||||
|
||||
|
Re: why h1 doesn't inherit font -size from body?
Edited my post: I'm more clear on your question now and my answer isn't relevant, sorry!
Last edited by herkalees; Dec 2nd, 2005 at 18:31. |
|
#3
|
|||
|
|||
|
Re: why h1 doesn't inherit font -size from body?
I belive its the way the browser handles the styles
You may be setting body to a cirtain text size like so body { font-size: 100%; } but default setting for h1 might be font-size: 18pt Which would pretty much override your setting. You would want to set font size for h1 as h1 { font-size: 100%; } |
|
#4
|
|||
|
|||
|
Re: why h1 doesn't inherit font -size from body?
I believe most browsers have a default setting on ems, 1em=16px(approx) so if the body {font-size:100%;} then when defineing the H1 {font-size: x ;} *Where x is equal to sizing*
you could set it to h1 {font-size:1em;} which would make it the same as the body size. I think, if im wrong somebody tell me. Cheers Gecko Last edited by surfthegecko; Dec 15th, 2005 at 14:56. |
![]() |
| Tags |
| doesnt, inherit, font, size, body |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Font Size in BODY attribute | nne | Website Planning | 7 | Sep 11th, 2007 11:35 |
| IE7 font size and formatting - help | Xhristy | Web Page Design | 4 | Apr 3rd, 2007 17:35 |
| body font size problem | samv | Web Page Design | 6 | Feb 21st, 2007 11:55 |
| How font size works in CSS? | sahota | Web Page Design | 19 | Dec 20th, 2006 22:56 |
| font-size: does not work in <body> | andersonoo7 | Web Page Design | 4 | Jul 23rd, 2005 03:00 |