WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Background Image repeat CSS Styling Help (4 posts)

  1. mrkingid
    Member
    Posted 6 years ago #

    You can see on the page that the background keeps going until the end of your browser by going to one of the many pages, the lines on the side continue down. I'd like them to stop at the footer no matter how short the page is.

    My style for this is:
    body {
    background: #FFFFFF url(images/bg.jpg) top center repeat-y;
    color: #545454;
    font-size: 13px;
    font-family: Verdana, Helvetica, Arial, sans-serif;
    margin: 0px 0px 0px;
    }

    I tried placing the "background: #FFFFFF url(images/bg.jpg) top center repeat-y;" in the #content are, but it doesn't show that way. Anyone know how to do what I am looking for.

    Hoping someone can help me here.

    Michael

  2. mendezki
    Member
    Posted 6 years ago #

    Using the background image for your #content div doesn't work since #content is not wide enough. The image is centered and the lines fall outside the width of the div, rendering it invisible.

    You could make the total width of #content so that it is 800px wide (adjusting padding & width in your css file so it looks like it did before), then apply the background to it.

    Alternatively, you can create an 800px wide new 'container' div around the #content div, and apply the background to that.

  3. mrkingid
    Member
    Posted 6 years ago #

    mendezki: ah that makes sense now. thanks

    the last alternative interests me, how would I go about it?

    "Alternatively, you can create an 800px wide new 'container' div around the #content div, and apply the background to that."

  4. mrkingid
    Member
    Posted 6 years ago #

    mendezki:: Thanks, I got it!!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic