WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Extra white bar below the footer (2 posts)

  1. manalive
    Member
    Posted 5 years ago #

    I had searched the forums for this problem, but had a hard time turning up anything useful. After some research on w3schools (I'm a noob when it comes to CSS), I finally turned up a solution.

    PROBLEM:
    A white bar was appearing below the footer after I customized the footer image for the Kubrick theme. The background was set to a blue repeating square jpeg, and I couldn't figure out where the white bar was coming from.

    SOLUTION:
    Fix the padding.

    In the original Kubrick style.css document, the structure for the footer text looks like this:

    #footer p {
    	margin: 0;
    	padding: 20px 0;
    	text-align: center;
    	}

    This was creating an extra 20 pixels of space above and below the footer text, which was creating the extra white space rather than allowing the blue background to show through. The way to fix it is to specify both top and bottom margins:

    #footer p {
    	margin: 0;
    	padding: 20px 0 7px;
    	text-align: center;
    	}

    Seven pixels is what worked for me--it might be different for you.

    I hope this helps anyone who runs into the same problem in the future. Perhaps somebody knows a fancier solution that prevents margin spillover from creating a white bar like this. If that knowledge is in your head, please share. Thanks!

  2. jahzoone
    Member
    Posted 4 years ago #

    Thanks manalive you saved me tons of time... 7px worked perfectly for me too :-)

Topic Closed

This topic has been closed to new replies.

About this Topic