Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 78503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:59:51+00:00 2026-05-10T20:59:51+00:00

I am writing a footer div that displays info from the database. The footer

  • 0

I am writing a footer div that displays info from the database. The footer has a different background color than the rest of the page, and will have a height that depends on how much content the database throws to it. When I generate the content with php and call for a border around the footer div, the content appears and is, let’s say, 400px high, but the div border appears as a 1px high rectangle at the top of the div.

How do I get the height to auto-fit the content?

<div id='footer'> <?php        $an_array=array();     $tasks=mysql_query('select stuff from the db');      while($row=mysql_fetch_assoc($tasks)){         extract($taskrow);         $an_array[]=$task;         }      $an_array=array_chunk($an_array,4);      foreach($an_array as $dtkey=>$dtval){         echo '<dl>';         foreach($dtval as $dtvkey=>$dtvval){             echo '<dt>'.$dtvval.'</dt>';          }         echo '</dl>';         } ?> </div> 

This is what I get. The area below the red border should be filled with a color. border image http://www.kevtrout.com/tortus/div.png

By popular demand, here is the css:

#footer{         border-top: 10px solid #d8d8d8;         background:#5b5b5b;         /*overflow:auto;*///Added this after seeing your answers, it worked           }               dl.tr{         width: 255px;         height:160px;         background: #5b5b5b;         margin:0px;         float:left;         padding: 10px;         }      dt.tr{         font-weight: normal;         font-size: 14px;         color: #d8d8d8;         line-height: 28px;         } 

edit: I am using firefox on a mac

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:59:52+00:00Added an answer on May 10, 2026 at 8:59 pm

    Check your footer CSS… if you have overflow set to anything but auto/scroll, then the DIV won’t grow.

    If not try using something other than DL/DT since DT’s are inline elements, they won’t push your div to fit content.*

    e.g. just try using a DIV instead, if the footer grows, you have your answer.

    (note: I revised order of suggestions)

    *(I realize spec-wise, that this Shouldn’t be an issue, but there wasn’t an indication of which browsers this was occuring in, thus I would not be at all surprised if IE was rendering differently than expected for example)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If all you want is a GUI, wxPython should do… May 11, 2026 at 10:14 am
  • added an answer You can index Dictionary, you didn't need 'get'. Dictionary<string,string> example… May 11, 2026 at 10:14 am
  • added an answer I am not sure what it is you are including… May 11, 2026 at 10:14 am

Related Questions

I am writing a footer div that displays info from the database. The footer
I am writing a query in which I have to get the data for
I am writing a few extensions to mimic the map and reduce functions in
I am writing a client-side Swing application (graphical font designer) on Java 5 .
I am writing a webapp using CodeIgniter that requires authentication. I created a model
I am writing a Browser Helper Object for ie7, and I need to detect
I am writing a Java utility that helps me to generate loads of data
I am writing a basic word processing application and am trying to settle on
I am writing a simple checkers game in Java. When I mouse over the
I am writing a bash script to deal with some installations in an automated

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.