Styling a comment box to appear below dynamically-generated comments
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-05T19:51:28Z
Indexed on
2010/04/05
19:53 UTC
Read the original article
Hit count: 422
css
Hello,
For the code below, how could I make the form always appear 30 pixels below the bottom of the HTML table styled with "commentecho"?
Thanks in advance,
John
$sqlStr = "SELECT comment.comment, comment.datecommented, login.username
FROM comment
LEFT JOIN login ON comment.loginid=login.loginid
WHERE submissionid=$submissionid
ORDER BY comment.datecommented DESC
LIMIT 100";
$result = mysql_query($sqlStr);
$arr = array();
echo "<table class=\"commentecho\">";
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td class="commentname1">'.$row["comment"].'</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="commentname2"><a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'">'.$row["username"].'</a>'.date('l, F j, Y &\nb\sp &\nb\sp g:i a &\nb\sp &\nb\sp \N\E\W &\nb\sp \Y\O\R\K &\nb\sp \T\I\M\E', strtotime($row["datecommented"])).'</td>';
echo '</tr>';
}
echo "</table>";
echo '<form action="http://www...com/sandbox/comments/comments2.php" method="post">
<input type="hidden" value="'.$_SESSION['loginid'].'" name="uid">
<input type="hidden" value="'.$submissionid.'" name="submissionid">
<input type="hidden" value="'.$submission.'" name="submission">
<label class="addacomment" for="title">Add a comment:</label>
<input class="commentsubfield" name="comment" type="comment" id="comment" maxlength="1000">
<div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div>
</form>
';
© Stack Overflow or respective owner