0

This is a jsfiddle http://jsfiddle.net/zFSLM/1/

try to enlarge the width of the view in jsfiddle please

This is the result:

enter image description here

Please check that the h1 has a padding around it, where does it come from?

This is the css of the h1

.inputForm ul h1{
    font-weight: 700;
    color: inherit;
}
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253

4 Answers4

2

It's not padding, it's margin add to

.inputForm ul h1{
    margin:0;
}

It's from the user agent style sheet, see:

What is user agent stylesheet

Community
  • 1
  • 1
joegandy
  • 320
  • 1
  • 5
1

Browsers by default give h1 a margin. Just add margin: 0 in your css:

.inputForm ul h1{
    font-weight: 700;
    color: inherit;
    margin: 0;
}
Jmh2013
  • 2,625
  • 2
  • 26
  • 42
1

I would apply the following styles to your H1 CSS:

margin:0; padding: 0;

It appears that it is being generated by the user agent stylesheet - also known as your browser's default styling on basic HTML elements.

alanine
  • 121
  • 5
1

It is almost always a good practice to use some version of a reset file: http://www.cssreset.com/. I use Eric Meyer's version. Some prefer normalize.css. At any rate, it is good to neutralize browser stylesheets to have more flexibility and control over how you want your page to look.

DRD
  • 5,557
  • 14
  • 14