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 6 of 6
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts

    The Wrapper Will Not Expand Its Color

    I have a background picture set to repeat like this in my css file:

    body {
    background-image:url(body_bg.gif) ;
    background-repeat:repeat-x;
    background-color:#d4e1f0;
    }

    ^This works fine. the body_bg.gif is only around 500px in height, so I simply added the background color and it expanded down to the bottom of the page which is just what I wanted.

    Now, when I try to do this with my #wrapper, it creates a problem.

    #wrapper {
    width:1000px;
    margin:auto;
    background:url(page_bg.gif);
    background-repeat:no-repeat;
    }

    The page_bg.gif also ends around 500px so I also tried using the background, background-color etc to get it to expand, but it seems as no matter what I do nothing changes.

    Any advice?

    Thank you.
    I am on my way. :)

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I'm guessing you are floating some elements causing the wrapper not to expand. We need to see the rest of your code.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Attached is my CSS file.


    Also something that has never happened before, my text if it is too long for the line, is just going on as long as it needs to.
    Attached Files Attached Files
    I am on my way. :)

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    We need to see your html as well. Like I said you are probably floating some elements and forgot to clear them.
    http://www.positioniseverything.net/easyclearing.html <-read that
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ah Sorry. Here is my html


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link type="text/css" rel="stylesheet" href="master.css"/>
    </head>
    <body>
    <div id="wrapper">



    <div id="heading">
    here is my heading
    </div>

    <div id="advert">

    Advertisement
    </div>

    <div id="side">
    here is the side
    </div>

    <div id="content">
    Here is where my content goes.

    dsgfdsgdfs
    </div>

    <div id="footer">
    Here is a footer
    </div>

    </div>
    </body>
    </html>
    I am on my way. :)

  • #6
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts
    _Aerospace_Eng_ thank you very much!


    I just went ahead and set the content to

    clear:both


    viola! Problem solved!

    Thanks
    I am on my way. :)


  •  

    Posting Permissions

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