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
    May 2006
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Wrapper not expanding for content div

    Hello,

    I have a problem that I think is very common, but I can't find the solution anywhere..

    I have a standard site (wrapper with a header, content and footer divs inside it). The content div overlaps the header and that works fine. However, when I add more text, the wrapper won't expand, the text just spills over the footer. Here's a link:

    http://www.elroperodetiffany.com/home.html

    I just need the pink text to push the footer down when the content requires so. I've looked at the ton of height issues around the internet but I can't find figure it out.

    Here's my code, but css and html:

    Code:
    @charset "UTF-8";
    /* CSS Document */
    
    body{
    padding: 0px;
    background-color:#c5c0ab;
    text-align:center;
    margin:auto;
    width:950px;
    font-family:"Courier New", Courier, monospace;
    color:#c5c0ab;
    font-size:13px;
    }
    
    #wrapper{
    margin: 0px;
    padding: 0px;
    background-image:url(images/fondo.png);
    background-repeat:repeat-y;
    background-position:center;
    width: 950px;
    height:auto;
    margin-bottom:20px;
    }
    
    #header{
    padding: 0px;
    background-image:url(images/bgrnd2.png);
    background-repeat:no-repeat;
    width:950px;
    height:694px;
    } 
    
    #content{
    padding:20px;
    position:absolute;
    margin-left:95px;
    background-image:none;
    width:720px;
    height:auto;
    text-align:left;
    top:300px;
    color:#FF0099;
    }
    
    #footer{
    width:950px;
    height:57px;
    background-image:url(images/footer.png);
    background-repeat:no-repeat;
    line-height:30px;
    }
    Code:
    <!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>El ropero de Tiffany</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    <div id="wrapper">
    <div id="header"></div>
    <div id="content">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer. Sed aliquam, nunc eget euismod ullamcorper, lectus nunc ullamcorper orci, fermentum bibendum enim nibh eget ipsum. Donec porttitor ligula eu dolor. Maecenas vitae nulla consequat libero cursus venenatis. Nam magna enim, accumsan eu, blandit sed, blandit a, eros.
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer. Sed aliquam, nunc eget euismod ullamcorper, lectus nunc ullamcorper orci, fermentum bibendum enim nibh eget ipsum. Donec porttitor ligula eu dolor. Maecenas vitae nulla consequat libero cursus venenatis. Nam magna enim, accumsan eu, blandit sed, blandit a, eros.
    
    Quisque facilisis erat a dui. Nam malesuada ornare dolor. Cras gravida, diam sit amet rhoncus ornare, erat elit consectetuer erat, id egestas pede nibh eget odio. Proin tincidunt, velit vel porta elementum, magna diam molestie sapien, non aliquet massa pede eu diam. Aliquam iaculis. Fusce et ipsum et nulla tristique facilisis. Donec eget sem sit amet ligula viverra gravida. Etiam vehicula urna vel turpis. Suspendisse sagittis ante a urna. Morbi a est quis orci consequat rutrum. Nullam egestas feugiat felis. Integer adipiscing semper ligula. Nunc molestie, nisl sit amet cursus convallis, sapien lectus pretium metus, vitae pretium enim wisi id lectus. Donec vestibulum. Etiam vel nibh. Nulla facilisi. Mauris pharetra. Donec augue. Fusce ultrices, neque id dignissim ultrices, tellus mauris dictum elit, vel lacinia enim metus eu nunc.
    
    Proin at eros non eros adipiscing mollis. Donec semper turpis sed diam. Sed consequat ligula nec tortor. Integer eget sem. Ut vitae enim eu est vehicula gravida. Morbi ipsum ipsum, porta nec, tempor id, auctor vitae, purus. Pellentesque neque. Nulla luctus erat vitae libero. Integer nec enim. Phasellus aliquam enim et tortor. Quisque aliquet, quam elementum condimentum feugiat, tellus odio consectetuer wisi, vel nonummy sem neque in elit. Curabitur eleifend wisi iaculis ipsum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non velit non ligula laoreet ultrices. Praesent ultricies facilisis nisl. Vivamus luctus elit sit amet mi. Phasellus pellentesque, erat eget elementum volutpat, dolor nisl porta neque, vitae sodales ipsum nibh in ligula. Maecenas mattis pulvinar diam. Curabitur sed leo.
    
    Nulla facilisi. In vel sem. Morbi id urna in diam dignissim feugiat. Proin molestie tortor eu velit. Aliquam erat volutpat. Nullam ultrices, diam tempus vulputate egestas, eros pede varius leo, sed imperdiet lectus est ornare odio. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin consectetuer velit in dui. Phasellus wisi purus, interdum vitae, rutrum accumsan, viverra in, velit. Sed enim risus, congue non, tristique in, commodo eu, metus. Aenean tortor mi, imperdiet id, gravida eu, posuere eu, felis. Mauris sollicitudin, turpis in hendrerit sodales, lectus ipsum pellentesque ligula, sit amet scelerisque urna nibh ut arcu. Aliquam in lacus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla placerat aliquam wisi. Mauris viverra odio. Quisque fermentum pulvinar odio. Proin posuere est vitae ligula. Etiam euismod. Cras a eros.
    
    Nunc auctor bibendum eros. Maecenas porta accumsan mauris.
    </div>
    <div id="footer">
    &copy; El ropero de Tiffany 2008</div>
    </div>
    </body>
    </html>
    Thanks a lot for any help!!
    Last edited by Puckle; 07-15-2008 at 02:01 AM.

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Change this part:
    Code:
    #content{
    padding:20px;
    position:absolute;
    margin-left:95px;
    background-image:none;
    width:720px;
    height:auto;
    text-align:left;
    top:300px;
    overflow:auto;
    color:#FF0099;
    }
    to:
    Code:
    #content{
    padding:20px;
    margin:auto;
    background-image:none;
    width:720px;
    height:auto;
    text-align:left;
    overflow:auto;
    color:#FF0099;
    }
    You might also find it useful to adjust your header div's height to 300px.

    Hope it helps.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • Users who have thanked rangana for this post:

    Puckle (07-15-2008)

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts
    That does work, except it no longer overlaps the header, it's pushed all the way down to where it ends....and adding the 300px height to the header seemed to make no difference.

    Thanks though

  • #4
    New Coder
    Join Date
    May 2006
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Oh wait, there it is. I just added a -300px margin-top to your code.

    Thanks!!


  •  

    Posting Permissions

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