Just to show the concept i decided to make a speech bubble with a little pointer out of only html and css3.
HTML:
<div class="bubble">
<div class="pointer">
<div class="one"></div>
<div class="two"></div>
</div>
<div class="content">
<p>Hey do you like this bubble?</p>
</div>
</div>
CSS:
.bubble {
width:400px;
color:#efefef;
}
.bubble .pointer {
height:15px;
background:#393939;
}
.bubble .pointer div {
height:100%;
background:#ffffff;
}
.bubble .pointer .one {
width:50%;
-moz-border-radius-bottomright: 15px;
-webkit-border-bottom-right-radius:15px;
float:left;
}
.bubble .pointer .two {
width:50%;
float:right;
-moz-border-radius-bottomleft: 15px;
-webkit-border-bottom-left-radius:15px;
}
.bubble .content {
padding:10px;
-moz-border-radius: 10px;
-webkit-border-radius:10px;
background:#393939;
text-align:center;
}


Comments
so like it!
Very useful utility.
Thanks for the great tutorial.
I was wondering how to add bubbles and you have described it so nicely.
[url=http://orderviagra-online.com]buy generic levitra online[/url]
To generic drugs, a large portion of the costs incurred during initial manufacturers of brand tag drugs are for inspect and maturation and advertising. The expense of obtaining FDA approval unequalled in the U.S. is enormous. Manufacturers of generic drugs do not get to absorb or recover these costs. Hence, noteworthy cost savings can be passed along to you.
[url=http://orderviagra-online.com]buy cheap levitra online[/url]
i see the css now. How annoying
Your speach bubble sux! It’s an image of one, not the real thing. Meaning its a fake wanna be. I came to this page in IE 8 wanting to test how gracefull the fallback css is!!!
“Maybe it would be better to inject this code with javascript and leave the html clean.”
- or use :before/:after (with a javascript fallback for MSIE)
Hi man keep write much more about CSS Concept.,
Very nice tutorial. Thanks
this site contains very awesome discussion and great sort of informative stuff useful one for many others needs this kind of stuff,..pass4sure HP0-J34
best regards,..
Shawn,..
very good tutorial
Thats one fine example of what CSS can do ! I am so impressed, I am adding this tutorial to my CSS aggregator site. Hope you dont mind.
This might be a nice thing to add in my site.
I’ve produced the same effect and several others without requiring empty elements – j.mp/bMGm6h
its nice and cool, but i cant help thinking of but-cheeks
this is really very nice
thanks for this post
Tutorial City & James im just polishing up the jQuery version and I should have it up early this week.
And Luminarious Thanks for the suggestion I’ve added it into the jQuery version.
Thanks for all you comments so far.
I agree with Tutorial City. The style of thinking that enabled you to create this is highly valuable though. Cheers to that!
Why not include the W3C draft version — border-bottom-right-radius — an the like as well? Just to future-proof, you know.
Yeah, I’m in the process of creating a jQuery plugin for this effect. Thanks for your comment.
The effect is pretty cool, but I don’t think its a good idea to create useless dom element just to create a visual effect like this. Maybe it would be better to inject this code with javascript and leave the html clean.