How does one make this little triangle bump at the bottom as on the picture bubble?
What is the best way to do it without using images?
How does one make this little triangle bump at the bottom as on the picture bubble?
What is the best way to do it without using images?
This thing named 'Speech Bubble'.
p {
font-family: Arial,'Helvetica Neue',Helvetica,sans-serif;
font-weight: bold;
margin: 1em 0;
}
.triangle-isosceles {
position: relative;
padding: 15px;
margin: 1em 0 3em;
color: #fff;
background: #0095ff;
}
.triangle-isosceles:after {
content: "";
position: absolute;
bottom: -10px;
left: 50px;
border-width: 10px 10px 0;
border-style: solid;
border-color: #0095ff transparent;
display: block;
width: 0;
}
<p class="triangle-isosceles">Address</p>
Check out this example: http://nicolasgallagher.com/pure-css-speech-bubbles/demo/
This is how it can be done:
.box {
width: 200px;
height: 25px;
border-radius: 2px;
padding: 5px;
font-family: 'Arial';
text-align: center;
color: white;
background-color: lightblue;
}
.box::after {
content: ' ';
position: relative;
top: 36px;
left: -75px;
border-style: solid;
border-width: 7px 7px 0;
border-color: lightblue transparent;
}
The ::after
CSS pseudo is important, since that is what creates the little cursor at the bottom.