Rounded corners in all browsers

death180

Seasoned Veteran
Joined
Jul 3, 2009
Messages
4,338
Reaction score
0
FP$
1,767
Hey guys, I am building a website but I am fairly new to rounded corners.

This is what I currently have but it doesn't work in IE, Only FireFox.

Code:
-moz-border-radius: 5px;
border-radius: 5px;

I know there is a way to use images to get the rounded corners and forums often use that, but I don't know how to do that.

Much help would be appreciated.
 
What I would do for this case is use images. Make a rounded corner for each corner. That way it definatly will work for ALL browsers that support images :great:
 
Okay I see, what would I put in the CSS, that's really where it confuses me.
 
You can get css to work around IE. I will post how to do it(pretty easy) later on. 🙂
 
Also use -webkit-border-radius. That will make it work for several other browsers other than FireFox. IE not included.
 
2 things i need to know, how do I make the images.. and then what do you put in the css to get it to work. if i were to do it with images.
 
With images, it's simple

You make, with an image editing tool, one image for each corner. The way I did it was with tables.

Briefly and basically,

Code:
<table>
<tr><td><img src="imgcorner1.png" /></td><td></td><td><img src="imgcorner2.png" /></td></tr>
<tr><td>content here</td></tr>
<tr><td><img src="imgcorner3.png" /></td><td></td><td><img src="imgcorner4.png" /></td></tr>
</table>
 
Jonathan said:
With images, it's simple

You make, with an image editing tool, one image for each corner. The way I did it was with tables.

Briefly and basically,

Code:
<table>
<tr><td><img src="imgcorner1.png" /></td><td></td><td><img src="imgcorner2.png" /></td></tr>
<tr><td>content here</td></tr>
<tr><td><img src="imgcorner3.png" /></td><td></td><td><img src="imgcorner4.png" /></td></tr>
</table>
Doing that's a gigantic pain. I would recommend using CSS but designing it so that the design isn't ruined if the visitor is using IE.
 
Cosmic said:
Also use -webkit-border-radius. That will make it work for several other browsers other than FireFox. IE not included.
Also put -khtml-border-radius and -o-border-radius for opera and khtml web browsers.
 
Cosmic said:
Doing that's a gigantic pain. I would recommend using CSS but designing it so that the design isn't ruined if the visitor is using IE.
I agree, it's not a good idea really. Not something I'd look into doing anymore. It's still an option though, if you want compatibility with all browsers or perhaps more interesting corners
 
Code:
-moz-border-radius: 8px; 
-webkit-border-radius: 8px;
	behavior: url(border-radius.htc);
        border-radius: 8px;

Download border-radius.htc here

Upload htc file to your main directory.

That covers all browsers I believe.
 
death180 said:
that doesn't work in Internet Explorer.

You need the htc file and a call to it via css for it to work on IE...

Did you even try it?
 
I like that first one but I am using fieldsets which I have pretty much figured out that no matter what I do it still won't be read correctly by IE.
 
Back
Top Bottom