Hi there everyone!
I used a text bubble generator to make some comment divs. The generator created a rounded comment box with a little arrow on the left. The issue was that the comment bubble was set to a fixed height and I need it to grow with the comment.
I modified bubble1 to set the height to auto. When I did that, the arrow disappeared from the box. The box below with the fixed width shows the arrow that should be there.
Demo page: http://schw.im/bubbles.htm
my css:
<style>
.bubble1
{
position: relative;
overflow-y: auto;
width: 600px;
height: auto;
padding: 5px;
background: #FAE4B1;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
.bubble1:after
{
content: '';
position: absolute;
border-style: solid;
border-width: 20px 15px 20px 0;
border-color: transparent #FAE4B1;
display: block;
width: 0;
z-index: 1;
margin-top: -20px;
left: -15px;
top: 50%;
}
.bubble2
{
position: relative;
width: 600px;
height: 75px;
padding: 5px;
background: #FFD778;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
.bubble2:after
{
content: '';
position: absolute;
border-style: solid;
border-width: 20px 15px 20px 0;
border-color: transparent #FFD778;
display: block;
width: 0;
z-index: 1;
margin-top: -20px;
left: -15px;
top: 50%;
}
</style>
Could someone help me get my arrow back? I would like it to stay to the upper left corner of the bubble, if that’s possible.
Thanks for your time!