Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CSS auto hight query

Options
  • 23-06-2006 2:27pm
    #1
    Registered Users Posts: 3,514 ✭✭✭


    Hi,
    I have a div which contains a background image. Within that div i want to place a few more divs which will contain images. The problem i'm having at the moment is that when i add images to the divs, the main div does not adjust it's height to fit them in. So i have an overlapping div.

    This is the css for the larger div
    #Layer9 {
         position: absolute; left: 98px; top: 344px; width: 771px; height: 600px; z-index: 9;
         background-image: url(blue_layout_imgready_09.gif);
         background-repeat: repeat-x;
         margin: 0px;
         padding: 0px;
    

    and this is a sample of the inner divs
    #Layer24 {
        position:absolute;
        width:1px;
        height:auto;
        z-index:2;
        left: 460px;
        top: 236px;
        background-image: url(advert_border.gif);
    }
    

    I wouldn't be too much of an CSS expert so the problem is probably easily resolved. Thanks


Comments

  • Registered Users Posts: 3,594 ✭✭✭forbairt


    hmm if you want to throw up the sample code I can take a quick look at it ...

    failing that ... after all the final internal div put in a
    <br style="clear:both;" />
    

    edit: I should say throw up the sample page ? ...

    edit edit: ... you've them all positioned absolutely ... this means the parent div doesn't actually know where its internal divs finish


  • Registered Users Posts: 3,514 ✭✭✭Rollo Tamasi


    thanks for the offer, i'll send you on a lick to the url via PM's
    I'm not sure what value the position should be, i tried putting height auto but it didn't work either.


Advertisement