Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

h1 font-size %

Status
Not open for further replies.

RedRobotHero

Technical User
May 2, 2003
94
CN
I want to set the font-size for <h1> <h2> <h3> etc. for a site I'm working on. Now, it's easy enough to set it to a pixel size, but the site I'm working on I'm trying to let the font size be set by the browser. I was trying to set H1 to 150%, but, of course, it displays at 150% of what H1 normally is.

If I want H1 to be 150% the size of the body text, can I just say, &quot;It looks like it normally displays around 180% of the body text, so I'll make it 83% of that?&quot; Is there a standard for how large H1, H2, H3 etc. normally appear?
 
Hang on. My bad. I did something stupid, and, in fact, it DOES base the size on the body text. So, that's simple.
 
I don't think the size of H1's are standardized. You could instead specify the size relative to the current font size.
Code:
 h1{font-size: 5em}
 h2{font-size: 3.3em}
 h3{font-size: 2.5em}
 h4{font-size: 1.7em}
 h5{font-size: 1em}
The em being the relative font size.

Kevin
A+, Network+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top