Ich baue ein Forum mit PHP und Bootstrap. Es funktioniert 100%, mein einziges Problem ist, wenn ein Benutzer in einem Thread postet, der Post und die Benutzerprofilbilder haben eine große Lücke. Es sieht aus wie ein Polsterungsproblem, aber es gibt keine Polsterung zwischen ihnen. Jeder möglicher RatAbstand zwischen Benutzerprofilbild und Inhalt. Bootsrap
echo '<div class="container form">
<div class="page-header page-heading">
<tr class="text-center">
<th colspan="2"><h2>' . $row['topic_subject'] . '</h2></th>
</tr>
<table class="table forum table-striped table-hover">
<thead>
<tr>
<th class="cell-stat"></th>
</tr>
</thead/>';
//fetch the posts from the database
$posts_sql = "SELECT
posts.post_topic,
posts.post_content,
posts.post_date,
posts.post_by,
users.user_id,
users.user_name
FROM
posts
LEFT JOIN
users
ON
posts.post_by = users.user_id
WHERE
posts.post_topic = " . mysql_real_escape_string($_GET['id']);
$posts_result = mysql_query($posts_sql);
if(!$posts_result)
{
echo '<tr><td>The posts could not be displayed, please try again later.</tr></td></table>';
}
else
{
while($posts_row = mysql_fetch_assoc($posts_result))
{
echo '
<tbody>
<tr>
<td class="text-center">
</td>
<td class="hidden-xs hidden-sm">
<img src="ppp.png"><br>
<i class="fa fa-clock-o">
</i>
<ul class="pull-left user-info">
<li>'
.$posts_row['user_name'].
'</li>'.
'<li>'
. date('d-m-Y H:i', strtotime($posts_row['post_date'])).
'</li>
</td>
<td class="pull-right">'.
'<p>'
.htmlentities(stripslashes($posts_row['post_content'])).
'</p>
</td>
</tr>';
}
}
if(!$_SESSION['signed_in'])
{
echo '<tr><td colspan=2>You must be <a href="signin.php">signed in</a> to reply. You can also <a href="signup.php">sign up</a> for an account.';
}
else
{
//show reply box
echo '<tr><td colspan="2"><h2>Reply:</h2><br />
<form method="post" action="reply.php?id=' . $row['topic_id'] . '">
<textarea name="reply-content"></textarea><br /><br />
<input type="submit" value="Submit reply" />
</form></td></tr>';
}
//finish the table
echo '</thead></table>';
}
}
Vielleicht versuchen, das Bootstrap Media Object verwenden? http://getbootstrap.com/components/#media Es wurde entwickelt, um solche Dinge anzuzeigen. –
Jede andere Hilfe mit diesen Jungs – andre