Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newbie Trying To Use H1 Tag

    Hi,

    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:
    http://www.oaklivingroomfurniture.co.uk

    Page without H1:
    http://www.pinelivingroomfurniture.co.uk

    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?

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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:

    Code:
    *{margin:0;padding:0}
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •