I have the following CSS which applies to a P tag for a nice neat speech bubble.
I need to create the same effect without using BEFORE or AFTER pseudo elements.
This is because they are not supported by mPDF.
Is anyone able to figure out a way of achieving this?
Thanks,
anyway, it looks like it does support CSS transforms. so you could do this as well.
<style>
.bubbled {
position:relative;
padding:15px;
margin:1em 0 1em;
color:#333;
background:#fff;
/* css3 */
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
}
.bubbled, .aft{
border:5px solid #F7827B;
}
.bubbled .aft{
position:absolute;
bottom:-16px; /* value = - border-top-width - border-bottom-width */
border-top:none;
border-left:none;
left:40px; /* controls horizontal position */
width:20px;
height: 20px;
background:#fff;
-webkit-transform: rotate(45deg)
}
</style>
<p class='bubbled'>CONTENT. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<b class="aft"></b></p>
I gave a class to the B tag, because I know some people do use it to bold text ( although that should only be done in rare occasions)