why h1 doesn't inherit font -size from body?

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 2nd, 2005, 15:13
New Member
Join Date: Dec 2005
Location: UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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>.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 2nd, 2005, 15:59
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 2nd, 2005, 22:09
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
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%; }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Dec 12th, 2005, 20:55
Junior Member
Join Date: Dec 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
doesnt, inherit, font, size, body

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 21:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42