1
I am developing a chat using PHP, Mysql and jQuery.
My question is how can I make the users' message stay one to each side to differentiate?
Follow the PHP code:
echo "
<div class=\"row msg_container base_sent\">
<div class=\"col-md-10 col-xs-10\">
<div class=\"messages msg_sent\">
<p style=\"color: #303030\">$mensagem</p>
<time datetime=\"2009-11-13T20:00\" style=\"color: #303030\">$nick - $newHora</time>
</div>
</div>
<div class=\"col-md-2 col-xs-2 avatar\">
<img src=\"http://www.bitrebels.com/wp-content/uploads/2011/02/Original-Facebook-Geek-Profile-Avatar-1.jpg\" class=\"img-responsive\">
</div>
</div>";
I believe that image can help understand what I want:
Use CSS. For more information, edit your question and place the HTML and CSS codes. Don’t put the full page code, just what’s related to the problem, but focus on crafting a [mcve].
– Woss
I guess you forgot to read what a [mcve].
– Woss