View Full Version : Newbie Trying To Use H1 Tag

11-08-2009, 01:41 AM

I am trying to design a page using a H1 Tag for the first time. However when I use it makes the area look messy:

Page with H1:

Page without H1:

I haven't added any height dimensions in the H1 tag but it makes the section I want to use it on appear enlarged, can anyone advise me how I can fix this please?

11-08-2009, 10:13 AM
It's probably the default top and bottom margins, here applied to the <h1> element. These vary dependent upon the browser used.

A way of dealing with this is to set all of the margins and padding to zero at the top of your css file via:


You can then set the margins on any element to be whatever you want and this should then apply consistently across all browsers. If you apply this setting and then have a look at the results you can then amend the margin to suit what you want.