SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Not a post-script error?!! guysmy's Avatar
    Join Date
    Sep 2001
    Location
    Underneath the Earth w/ Krom (Canada)
    Posts
    787
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Unwanted Header Padding On Wordpress Pages But Not Posts

    Wordpress header looks fine when viewing home page or blog posts. However, when you view pages, mysterious padding is added above and below any image in the header or footer file. So far, you can see that the logo gets pushed down as well as the social media icons. I had an image in the footer that did the same thing so this is a site-wide problem that only affects pages.

    Post example URL
    Page example URL

    Universal CSS

    Code CSS:
    html, body, form, ul, li, table, td { margin: 0; padding: 0; }body { position: relative; color: #333; }
    body, input, textarea { font-size: 13px; }
    a { text-decoration: none; }
    a:hover { text-decoration: underline; }
    a img { border: 0; }

    Header CSS

    Code CSS:
    .wrapper { padding-top: 31px; }
    #header { border-bottom: 1px solid #dedfe0; padding-bottom:20px;}
    #site-logo { float: left; width: 210px; padding-right: 40px; }
    #header-left { float: left; width: 210px; padding-right: 40px; }
    #header-center { float: left; width: 210px; padding-right: 30px; }
    #search { float: right; width: 220px; }
    #header-right { margin: 20px 0 0 10px; }

    Any insights will be GREATLY appreciated. Thanks beforehand.

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,759
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    On the bad page, you have a class on the <body> that is "page". In your CSS you have it set that any .page img{}'s are given margin:20px 0; which is causing the space. Remove the "page" class on the <body> element on the bad page.

    That affects all the images.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    Not a post-script error?!! guysmy's Avatar
    Join Date
    Sep 2001
    Location
    Underneath the Earth w/ Krom (Canada)
    Posts
    787
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much RyanReese! You nailed it exactly. Problem solved.

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,759
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    You're welcome . Glad I could help.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


Tags for this Thread

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
  •