+ Reply to Thread
Results 1 to 4 of 4

Thread: Div Height Not Expanding

  1. #1
    Barn Newbie kutatishh is an unknown quantity at this point kutatishh's Avatar
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    3

    Div Height Not Expanding

    Hello. I just wanted to share this solution I found for something that was bugging me to bits! I had created a site, and had a DIV wrapper that was being "ignored'. It was there, but was expanding to 0px or something, because I could not see it. I searched and searched then finally came to this solution of adding the following:

    height: 1%; overflow: hidden;

    example:

    #ContentWrapperDiv
    {
    width: 960px;
    background-color: #fff;
    margin-left: auto ;
    margin-right: auto ;
    height: 1%;
    overflow: hidden;
    }

    I have no idea what it means, or why it works, but I'm just happy and wanted to share. If anyone know what it means, please reply. Thanks so much.

  2. #2
    Barn Newbie kutatishh is an unknown quantity at this point kutatishh's Avatar
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    3

    Using "height: -1%;" works in Chrome and Safari

    Noticed however that this made Google Chrome and Safari not show the div and its content at all. Played around and found that using height: -1%; (negative 1 percent) works across all browsers. Still don't know why, but it works Woo!



    #ContentWrapperDiv
    {
    width: 960px;
    background-color: #fff;
    margin-left: auto ;
    margin-right: auto ;
    height: -1%;
    overflow: hidden;
    }

  3. #3
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Welcome to developerbarn I'm having trouble picturing the desired effect. Would it be possible for you to post a screen shot?
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  4. #4
    Barn Newbie Rangerbob5 is on a distinguished road Rangerbob5's Avatar
    Join Date
    Nov 2009
    Posts
    40
    Rep Power
    3

    I would like to see the result myself, because I would have done it another way.

+ Reply to Thread

Similar Threads

  1. Expanding a div height
    By richyrich in forum HTML & CSS Help
    Replies: 19
    Last Post: August 12th, 2009, 11:20 AM

Bookmarks

Posting Permissions

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

SEO by vBSEO