Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Post overlap

Featured Replies

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...

2fIXd.jpg

 

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; 
}

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.