Here is a complete working example in full (S) CSS, with variables for shadow width of nose size and optional border.
The trick is to get offsets and convert to the right to achieve pixel perfectness, and use overflow:hidden as needed to cut out the nose of your bubble (especially if you need borders).
The example in the answer above does not work for us, because the shadow is cropped and fits into the main area of ββthe bubbles.
IE7 / 8 degrades gracefully.
HTML:
<div class="chat"> <div class="bubble"> <span class='tail'> </span> <p>The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother keeper and the finder of lost children.</p><p>And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee.</p> </div> </div>
SCSS:
$shadow_radius = 6px; $nose_size = 12px; $shadow = 0 1px $shadow_radius
mezis Oct 22 '12 at 16:11 2012-10-22 16:11
source share