SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    7
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    How to eliminate space above the header?

    I want the header of this website http://nelsonnaibert.com.br/ to be at the very top of the page. I've tried everything I could, looked for answers in every forum but nothing's working.

    Is there anyone who could help me with that?

    Thanks a lot!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,221
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Hi laurabd. Welcome to the forums.

    The problem is here:

    Code:
    .header h1, .header h5 {
    font-size: 48px;
    text-transform: uppercase;
    margin: 10px 0 0 0;
    }
    That margin is pushing out the top of the container, because of "margin collapse".

    There are various ways to stop this happening. The easiest thing in this case would be simply to remove that top margin on the <h1>.

  3. #3
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    7
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Seems that I've tried everything but that. Thanks a lot, ralph.m!

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,221
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    You're welcome.


Bookmarks

Posting Permissions

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