33
loading...
This website collects cookies to deliver better user experience
.header
class and change the background-color
to #FFF
and add a border-bottom
of 1px solid #F5F5F5
. After that, add a margin-left
of 10px
for the .content
class..toggle-label
class and add the following styles to it.font-weight: bold;
font-size: 16px;
margin-left: 10px;
<div t:if="{{ conversation.others.length > 0 }}" class="message-author"
style="color: black; font-size: 14px">
{{ sender.name }} <span class = "time-sent"> {{ timestamp | date: "%H:%m %p"}}</span>
</div>
.message-row
class and add a margin-left
and a margin-right
of 30px
each. Delete the .message-row.by-me
class to align all messages in the same direction. For the timestamp near the user’s name, add the following lines of code..time-sent{
font-weight: 100;
font-size: 10px;
color: #71717A;
}
.message
class so that it looks like this..message {
white-space: normal;
overflow: hidden;
word-wrap: break-word;
position: relative;
display: inline-block;
max-width: calc(100% - 6rem - 0.25rem - 0.25rem);
background-color: #FFF;
color: #000;
}
.by-me .message
class, change the background-color
to #FFF
and the color
to #000
. You can delete the border-color
property here as well..logo
class and the .message
class..logo{
margin: 10px;
float: left;
}
.message {
white-space: pre-wrap;
margin-left: 1.5rem;
margin-right: 1.5rem;
margin-bottom: 2rem;
border-radius: 20rem;
padding: 5px;
overflow: hidden;
background-color: #F7F7F7;
color: #717171;
font-size: 11px;
font-weight: bold;
}
script.js
file and add an attribute to the conversation. The welcomeMessages
attribute is used to display system messages in your TalkJS conversations. You can add any message that you would like to display to the user in an array of strings.conversation.setAttributes({
welcomeMessages: ["To protect your payment, always communicate and pay through the Airbnb website or app", "Hosts can’t see your profile photo until after your booking is confirmed."]
})
fontSize
to 15px
. maxWidth
and minWidth
properties to 300px
each. After that change the borderColor
to #F5F5F5
. marginLeft
property to blank and both the width
and maxWidth
to 785px
. backgroundColor
to #FFF
. border-radius
of 30px
. Change the borderColor
to #71717A
and color
to #000
(black). backgroundColor
to #F7F7F7
and color
to #000
.width
of the chatbox to 380px
. That would look something like this.