July 13, 201115 yr Now i dont know if this is simple or hard. If its just css or php code i need But basically i have posting system and users can comment on posts. In the comments page it shows orginal post and one users have left (the comments) I had one in there and this was fine but i added another and it looked like this... As you can see a second comment (hello goodbye) overlaps the first one. I want it so that the 2 (or more) comments are displayed seperate. <div class="message"> <?php $sql = mysql_query("SELECT * FROM threads WHERE id = '". mysql_real_escape_string($_GET['id']) . "'") or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $posted = date("jS M Y h:i",$r['posted']); echo "".$r['author']." $posted"; ?> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<?php echo "".$r['message'].""; ?>"> Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <div class="message2"><?php echo " ".$r['message'].""; ?></div> <?php echo "Likes: ".$r['votes_up']." "; echo "Dislike: ".$r['votes_down'].""; }?> </div> <br/> <hr width="725px"> <?php echo "<h3>Replies...</h3>"; ?> <div class="message"><?php $sql = mysql_query("SELECT * FROM replies WHERE thread = '". mysql_real_escape_string($_GET['id']) . "'") or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $posted = date("jS M Y h:i",$r['posted']); echo "".$r['author']." $posted"; ?> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="<?php echo "".$r['message'].""; ?>"> Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <div class="message2"> <?php echo " ".$r['message']."" ; } ?> </div> </div> <hr width="725px"> <form action="newreply.php" method="POST"> Your Name: <input type="text" name="author"> <input type="hidden" value="<?php echo $_GET['id']; ?>" name="thread"><br> Message:<br><textarea cols="60" rows="5" name="message"></textarea><br> <input type="submit" value="Post Reply"> </form> Im sure this is just something im missing or something but i really am clueless! Help? CSS .message { width: 500px; color: black; background: white; padding:8px; border:1px solid white; margin:5px auto; -moz-border-radius:8px; } .message2 { background-color: grey; }
July 13, 201115 yr Author more then likly a css problem One of the problems was that the '}' was in the wrong place but now it looks like this...
Create an account or sign in to comment