Style heading tags with css reset [closed]
Asked Answered
S

1

8

After using a css reset, all my heading tags are reset (ofcourse). What is the best way to style them like normal.

Surely there is better way then this?

h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1em; }
h5 { font-size: 0.8em; }
h6 { font-size: 0.7em; }
Stairway answered 28/7, 2013 at 8:28 Comment(3)
possible duplicate of CSS Reset, default styles for common elementsLiturgics
You mean the css reset has something like * {font-size:1em}? Things like that don't actually solve any problems, you know. To answer your question: yes, there is a better way. Don't use the css reset. But if you absolutely must, then what you have there in your question is not enough; you'll also need to restore the font-weight and the top and bottom margins for each of the headers.Suellen
It didn't answer my question but it did lead me to normalize.css which eliminates the problem altogether. \o/ Thanks for answers!Stairway
M
6

The way that you have set up the new header style will work fine. You might want think about adding

h1,h2,h3,h4,h5,h6 {
  font-weight: normal;
  font-style: normal;
}

to make sure the type is default set to non italic/oblique or bold (unless you want the default to be strong)

Miramirabeau answered 29/7, 2013 at 18:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.