tags:

views:

386

answers:

4

I know to make round corner is not possible for IE without Javascript or images. JS solution will not work if js is disabled so i want to go for image option

i need any images + css solution to make cross browser compatible round corner div with minimal ,easy to make and pure semantic and W3C valid code, strechable and minimal use of images and photoshop effort.

I know about FF and safari can do with pure css but i need cross browser solution without javascript. I want to make with minimal use of XHTML code and images.

+3  A: 
eed3si9n
it's good but not strechable
metal-gear-solid
If you don't specify the width for the top div, the box seems to stretch up until certain point. See the credit box on the ThrashBox page.
eed3si9n
I'd rather look at the url above and choose the one that suits my needs. However IMHO you'll always end up using photoshop.
Salman A
A: 

I would just do something like this

<div id="box">
<p>content</p>
<span class="top-left"></span>
<span class="top-right"></span>
<span class="bottom-left"></span>
<span class="bottom-right"></span>
</div>

And position the spans in the corners with absolute positioning. It's got a bit of pollution with the spans, but it will work cross browser. You may be able to get rid of one too, and just made the #box background one of the corner images.

Please make use of sprites too. Draw a circle, and use negative background positions to position a quadrant into each span.

If you wanted to be as semantic (and a little different) as possible, you could wrap all those spans in an IE conditional comment, apply border-radius to the box, and then apply the styles for the spans for our friend IE. This however would seem to me like a bit of overkill.

alex
+1  A: 

This site has a lot of "snazzy borders" and "krazy korners", Stu rocks!

Also you weren't specific in your question about boxes or buttons, so you can check out these links for some CSS methods:

An SO answer and some links: Sexy buttons and unbreakable buttons

fudgey
+1  A: 

I wrote about this a few years ago: semantic HTML, one image, minimal CSS, works in most browsers. Combines several techniques.

http://www.the-haystack.com/2006/03/16/rounded-corners/

Still, I would go for (-[prefix]-)border-radius in browsers that support it, and leave the other browsers as they are.

stephenhay
looking intresting . can u share psd of this image
metal-gear-solid
I don't have the PSD anymore. This was three years ago.
stephenhay