background pict -doesnt show up....

Discussion in 'Web Design and Development' started by pelsar, Nov 23, 2009.

  1. pelsar macrumors regular

    Joined:
    Apr 29, 2008
    Location:
    israel
    #1
    a pure technical problem that i can't seem to solve...

    http://www.spinnerdesign.co.il/_clients/GNE/index.html

    the lower section with the white background in fact should have a green background-


    but it doesn't...anybody know why? (the path has been check about 10x images/background-twocolors.gif
    )
     
  2. Cerebrus' Maw macrumors 6502

    Joined:
    Mar 9, 2008
    Location:
    Brisbane, Australia
    #2
    You have:

    Code:
    .container-home-bottom {
    background-image:url(images/background-twocolors.gif);
    background-repeat:repeat;
    position:relative;
    top:0;
    width:800px;
    }
    

    Take off the position relative and top:0 , and put in height:415px. IE, change to this
    Code:
    .container-home-bottom {
    background-image:url(images/background-twocolors.gif);
    background-repeat:repeat;
    height:415px;
    width:800px;
    }
    
    I think the problem lies with your use of floats, as you have specified the top holder as 25px in height, which your "home-bottom" then interperts as 0px when using position:relative. But then your inside elemets are also floated, which puts them out of their parents div box.

    If you struggle to see what I mean, put this code in: (basically an ammalgamation of the two above)

    Code:
    .container-home-bottom {
    background-image:url(images/background-twocolors.gif);
    background-repeat:repeat;
    position:relative;
    top:0;
    width:800px;
    height:415px;
    }
    
    See how your image now covers the above element? That because the "container-home-bottom" class actaully starts up there. So your image was there the whole time, just that it was behind the top element, as the bottom elements had floated down to the white space.
     
  3. pelsar thread starter macrumors regular

    Joined:
    Apr 29, 2008
    Location:
    israel
    #3
    thanks
    its a solution...and because its a very small website i suppose i can "get away with it"...having the page with a fixed length.....
     

Share This Page