Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

markfc

macrumors 65816
Original poster
Sep 18, 2006
1,084
3,103
Prestatyn, Wales, UK
I'm looking for some CSS to do mail.app like name bubbles on a php page.

The script pulls names out of database then will print each name in one of those bubbles. Any ideas where I could get something like that from?
 

Attachments

  • Picture 1.png
    Picture 1.png
    4.1 KB · Views: 195
CSS offers a property border-radius that can achieve that, but is only supported by the newer browsers and not IE. The more typical way is to make use of background images. There would be at least two images here, one for the left and one for the right. There's a number of tutorials for creating rounded corners, which would apply to this situation.
 
Put the names in some sort of container (probably a span for this) and give it a class like recipient (or something descriptive) and then do:

Code:
.recipient {
border : thin solid #b7d0f7;
background : url('image.png') #e1ebfb;
}

As Angelwatt said, you'll need to create the rounded effect with an image. The border color and background in the css will make it so that you'll at least have blue boxes (without rounded corners) if images are turned off.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.