0
I have the following span
with messages exchanged between a user A and a B. How can I configure these spans to appear each on your line. The way I got the style of span
it overwrites 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 doubt is, having the body
chat with maximum width 250px, how can I make the message to be a paragraph when it reaches 250px on body
#jd-chat .jd-body
{
overflow: scroll;
max-height:250px;
min-height:250px;
background:#FFFFFF;
overflow-x: hidden;
}
Thank you (y) was just that. I have another question, I will post in my post, maybe you can also help me.
– David Concha
By saying 'make a paragraph' you mean leave that text within a single span, and whatever else you play for another span? Would that be it?
– celsomtrindade
thanks for the answer. yes, I wanted it to go to another span
– David Concha
Only with css I believe it is not possible, I would have to use javascript for this. But I advise you to ask another question, not to mix things up. = D
– celsomtrindade