Trying to enhance the style in Ionic2, I have a message box:
https://i.sstatic.net/PCRtA.png
I am attempting to integrate this image into it:
https://i.sstatic.net/PSQID.png
To create a seamless look with the message box.
Facing an issue where the image is not being applied at all.
The CSS code I am using specifies the image here:
background-image: url(/assets/message-you.png)
. The image is present in that location as confirmed by tools like Firebug when hovered over.
Got the CSS code from a tutorial and unsure about how &::before {
functions.
Any guidance would be appreciated.
.messages-page-content {
> scroll-content {
padding: 0;
}
.messages {
height: 100%;
background-color: #E0DAD6;
background-repeat: no-repeat;
background-size: cover;
}
.message-wrapper {
margin-bottom: 9px;
&::after {
content: "";
display: table;
clear: both;
}
}
.message {
display: inline-block;
position: relative;
max-width: 236px;
border-radius: 7px;
box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
&.message-me {
float: right;
background-color: #DCF8C6;
&::before {
right: -11px;
background-image: url(/assets/message-me.png)
}
}
&.message-you {
float: left;
background-color: #FFF;
&::before {
left: -11px;
background-image: url(/assets/message-you.png)
}
}
&.message-you::before, &.message-me::before {
content: "";
position: absolute;
bottom: 3px;
width: 12px;
height: 19px;
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: contain;
}
.message-content {
padding: 5px 7px;
word-wrap: break-word;
&::after {
content: " \00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0";
display: inline;
}
}
.message-timestamp {
position: absolute;
bottom: 2px;
right: 17px;
font-size: 11px;
color: gray;
}
}
}
Reviewing the console output reveals:
https://i.sstatic.net/UA0wa.png
Image confirmation provided by Firebug: