126 users online (0 members and 126 guests)  

Thread: stretching div

  Results 1 to 2 of 2


  1. Replies: 2
  2. Template Stretching with CSS    Forum: CSS Forum
    Replies: 1
  3. Replies: 2
  4. stretching table    Forum: HTML Forum
    Replies: 5
  5. stretching image    Forum: HTML Forum
    Replies: 7
  1. #1
    sbolin's Avatar
    New User

    Join Date
    Aug 2004

    stretching div

    I have a fairly complex layout but need help with one particular area. I have 2 divs ("content-area" and "footer") located within a div named "page-wrapper".

    On some pages, the content-area div will expand beyond the set width of "page-wrapper". I need the "footer" div to stretch to the same width of the "content-area" div and can't seem to come up with a solution. See the code below...


    .page-wrapper {
    width: 200px;
    background-color: orange;

    .content {
    white-space: nowrap;

    .footer {
    background-color: green;
    height: 20px;



    <div class="page-wrapper">

    <div class="content">
    aso ifhoai shfoiash oifah osifh ao;isfhao; ishfoi; asfho ai

    <div class="footer"></div>



  2. #2
    supertek's Avatar
    please contact admin

    Join Date
    Aug 2004
    Wichita, KS
    Is the content supposed to go past the page wrapper? The footer is going to not go any bigger than the page wrapper.

    Unless you take and fill the footer div with &nbsp; , they are spaces and with enough of them you are more or less creating invisible content that will stretch the footer bar. Or use green text.

    If I could see how this is being used I might be able to come up with a better solution. I would just as soon restrict the content to the page wrapper size.

Tags for this Thread