I have the following span
with messages exchanged between a user A and a B. How can I configure these spans to appear each in their line. The way I have the style of span
it overlaps the messages on the same line.
<div class="jd-user">
<div class="jd-header" id="44">marisa09 •<span class="close-this"> X </span></div>
<div class="jd-body"><span class="me"> <span class="me"> Oii </span><span class="me"> teste </span>
<span class="me"> Olá </span>
<span class="other"> Oi </span>
<span class="me"> oii </span></span></div>
<div class="jd-footer"><input id="textareabox" placeholder="escrever..."> </div>
</div>
Style:
#jd-chat .jd-body {
overflow: scroll;
min-height: 250px;
background: #FFFFFF;
overflow-x: hidden;
}
#jd-chat .jd-body span.me
{
background:#DB3256;
display:block;
border-radius: 25px;
color:white;
}
#jd-chat .jd-body span.other
{
background: #337ab7;
display:block;
float:right;
border-radius: 25px;
}
My other question is, having body
of the chat with 250px of maximum width, how can I make the message make a paragraph when it reaches 250px in body
#jd-chat .jd-body
{
overflow: scroll;
max-height:250px;
min-height:250px;
background:#FFFFFF;
overflow-x: hidden;
}