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 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    extending divs height to 100%

    i am creating a site template for my sister. I am using Dreamweaver and i have a issue i can't work out how to achieve..

    Here is where im at...
    http://img213.imageshack.us/img213/4007/websitef.jpg

    I have 2 divs within a containing div...
    Code:
      <div id="maincontent-container">
      
        <div id="binder"> </div>
        
        <div id="maincontent"> </div>
    
      </div>
    Using CSS i am trying to get both divs to extend in height in tandam. So how ever long the maincontent div is the binder will extend the same.

    The binder image is a background image set to repeat down.

    I have set all 3 divs height to 100% but this hasn't worked.

    What do i need to do to achieve this?
    THANKS!

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Teed

  • #3
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks.

    i tried the method setting the container to overflow: hidden and setting the margin/padding on the bottom of the 2 inner divs to -/+99999px and that seems to have worked.

    are there any disadvantages of using that method?

  • #4
    New Coder
    Join Date
    Jan 2012
    Posts
    97
    Thanks
    1
    Thanked 13 Times in 13 Posts
    Just set margin: 0 auto; to those child divs


  •  

    Posting Permissions

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