tags:

views:

20

answers:

2

Hello,

I know how to generate rounded corners using images. But please have a look at the link :-

http://roundedbox.andreas-kalt.de/

The rounded corners on all four corners are all images, but my question is how are those borders in the middle done? Those green color borders that surround the whole div.

The tutorial is given but it is German :(. Also i don't want to use Css3 like -webkit-border-radius etc as they are not yet supported in IE

Thanks in advance :)

+1  A: 

The whole thing is done with a 4 background images here is the css

roundbox-tr {
    margin:15px auto;
    padding:0;
    background:url("roundbox_tr.gif") no-repeat right top;
    width: 90%;
}

/* top-left corner and left side */
.roundbox-tl {
    margin:0;
    padding:0;
    background:   url("roundbox_tl.gif") no-repeat left top;
}

/* bottom-right corner and bottom side */
.roundbox-br {
    margin:0;
    padding:0;
    background:   url("roundbox_br.gif") no-repeat right bottom;
}

/* bottom-left corner */
.roundbox-bl {
    margin:0;
    padding:0;
    background:   url("roundbox_bl.gif") no-repeat left bottom;
}
John Hartsock
You mean whole thing in a large big image? But, that is a very bad practise. Isn't it? Also, it is restricted by the width and height. What if i have a different width and/or height that the one shown in the url? Design a different image? Isn't that bad?
Ankit Rathod
yeah not a great idea for rounded corners. You could try NIFTY Corners. Google it you will find a good example.
John Hartsock
Hi John, i know they are done with 4 images(for four corners). But my question is, the css you posted is for the four corners. What about the border in the middle? The top middle border. If i am still not clear. Please let me know.
Ankit Rathod
look at each image http://roundedbox.andreas-kalt.de/[imagename] pay attention to the roundbox_br.gif and roundbox_tr.gif. Anything else you see on screen is just rendering issues with poorly created gif images
John Hartsock
here is the link to using Nifty corners. This allows you to create rounded corners using only css (no images). Its very handy. http://www.html.it/articoli/nifty/index.html
John Hartsock
Thanks John, they have used large images :p. It's not a good practise and perhaps only limited to the width and height of the image :(
Ankit Rathod
A: 

They are used images for border. Use firebug addons in mozilla and check that.

Karthik