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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:52:13+00:00 2026-06-09T20:52:13+00:00

I have a comment system, it works by adding a row to a SQL

  • 0

I have a comment system, it works by adding a row to a SQL database. Anyway That works, but then when I echo out the comment div gets all messed up.. Anyway here is the page it is on: http://learntc.net/index.php.

PHP:

while($row = mysql_fetch_array($result))
{
    if ($count==1)
    {
      $bg == "33383C" ;
      $count = 0;
    }
    echo "<div style='background-color: $bg; border: 1px soild silver;' class='comment'>";
    echo "<div class='imageAndName'>";
        echo "<img src='". $row["image"] ."' class='cPic'/>";
        echo "<div class='UserLink'><a href='" . $row["page"] . "'>" . $row["username"] . "</a></div>";
    echo "</div>";
    echo "<div class='textStuff'>";
        echo "<div class='post'>" . $row["comment"] . "</div>";
        echo "<div style='color: gray; font-size: 8px'>" . $row["date"] . "</div>";
    echo "</div>";
    echo "</div>";

    $bg = "#282C2F";
    $count = $count + 1;
}

CSS:

.comments{
    float: right;
    padding: 10px;
    width: 50%;
    border: 1px solid #454D53;
}
.cPic{
    width: 60px;
    height: 60px;
}
.imageAndName{
    width: 30%;
    overflow: hidden;
    float: left
}
.imageAndName a{
    display: block;
}
.textStuff{
    width: 70%;
    float: right;

}
.post{
    overflow: hidden;
    width: 100%;
}
.comment{
    padding-bottom: 5px;
}
  • 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-06-09T20:52:14+00:00Added an answer on June 9, 2026 at 8:52 pm

    Add clear: both to your .comment style.

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

Sidebar

Related Questions

I have a problem with a comment system. Adding comments works, and the MySql
I have a system of comments, and each comment has a button that normally
I have an application that mostly works, but am having one condition wherein the
I have the following code that works fine on my localhost using IIS7 but
I have a micropost/messaging system and each time a new micropost or comment/message is
I have a Comment model in my app but am encountering a lot of
I'm trying to figure out how I can have a comment header automatically added
I have a comment system where a user submits a comment, the comment is
I have added a bcc field to my email that I am sending out
I'm using Disqus as my blog comment system. Everything works fine, except the css.

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.