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 6596599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:05:49+00:00 2026-05-25T18:05:49+00:00

I have a bit of an issue… Ive made a div, and normally, it

  • 0

I have a bit of an issue…

Ive made a div, and normally, it expands to suit the height of its contents fine, however… Now i have a problem.

My content is being returned from a Sql statment, and its not expanding to suit its height, a working non dynamic version is

#commentblock {
    min-height:50px;
    width:90%;
    margin:20px auto;
    padding:10px;
    border:1px solid #999;
}

My code is as follows (its in a for loop making a new div for each instance)

// Now lets query to grab the responses to this fault
$querytwo = "SELECT * FROM comments WHERE faultid=".$fid;

// execute query
$resulttwo = mysql_query($querytwo) or die ("Error in query: $querytwo. ".mysql_error());

// see if any rows were returned
if (mysql_num_rows($resulttwo) > 0) {
    // print them one after another
    while($row = mysql_fetch_row($resulttwo)) {
        // lets make this render then
        echo "<div id='commentblock'>";
        echo "<div class='loggedby'>Logged By : <span>".$row[4]."</span><p class='contactno'>Entered : <span>".$row[3]."</span></p></div>";
        echo "<div class='info'><span>".$row[2]."</span></div>";
        echo "</div>";
    }       
}

// free result set memory
mysql_free_result($resulttwo);

// close connection
mysql_close($connection);

Thanks in advance 🙂

  • 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. Editorial Team
    Editorial Team
    2026-05-25T18:05:49+00:00Added an answer on May 25, 2026 at 6:05 pm

    Got it, the content was in a span which was inheriting a floating attribute. Removed the float – now its all fine 🙂

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

Sidebar

Related Questions

I have a bit of a weird issue. I want to add a div
I have a bit of an issue with my SQL statement. It is a
I have a bit of an issue with a site I maintain. I have
I am having a bit of a issue. I have an NSMutableDictionary with 10
hello fellow java developers. I'm having a bit of an issue here. I have
I have run into a bit of a design issue with my code. I
I am having a bit of a strange issue. I have a ListView which
I have a bit of a theoretical question, however it is a problem I
So I have a bit of an issue. I work for a small startup
I have got a bit of an issue and was wondering if there is

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.