Simple Rounded image (Facebook style)

Status
Not open for further replies.

litewarez

Active Member
1,367
2008
1
0
Just a tip to show you how to get rounded images like facebook 50x50 profile pictures

In your css document add the following selector:

Code:
img .round{
    border-radius: 5px;
}

Then for every image you wish to have rounded just add the class "round" to the image or image holder like so

Code:
    <img src="#image_location" class="round" />

This will produce:

icsnap1015501470.png


Note: this only works with certain browsers but if the browser is not compatible it will just show the normal image!
 
11 comments
This is for CSS 3 isn't it? not on all browsers yet.

another tip, use the Rounded Ellipse Tool on Photoshop :$
 
I think only Firefox and Safari 3 support this at the moment. Not worth using if you are serious about it as most people use other browsers. Opt in for JS or some other method until more browsers support it.
 
Yes Yais but its one of them things that you can add and it will only work on certian browser but wont change anything for the broswers that dont support it, its a minor GUI modification and for them with the browsers that support it you might aswell add it.. IMO
 
I knew this lol only Firefox 3 & Safari (I guess) supports this.

If I'm correct, then you can do rounded borders with something called -khtml ?
(Really, I had just read this somewhere, sorry if I'm wrong)
 
I found this somewhere else but its still a very useful post cant wait till all browsers support css 3 im going to use it and just put a firefox logo at the bottom like most sites do thanks litewarez keep these posts coming (y)
 
I found this somewhere else but its still a very useful post cant wait till all browsers support css 3 im going to use it and just put a firefox logo at the bottom like most sites do thanks litewarez keep these posts coming (y)

If people havent switched to FF by now they dont deserve to use it
 
Status
Not open for further replies.
Back
Top