views:

270

answers:

7
+2  Q: 

css3 IE 6 issue

Hi

I am executing the foll code in Firefox it works fine i am basically using CSS3 for creating rounded borders.

Please tell what changes I need to make to get the same output in IE6

Below is the code

<html>
<head>
<style type="text/css">
background-color: #ccc; 
-moz-border-radius: 5px; 
-webkit-border-radius: 5px; border: 1px solid #000; 
padding: 10px;
</style>
</head>
<body>
<div style=" background-color: #ccc; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #000; padding: 10px;" >
This is a new feature in CSS 3 </div>
</body>
</html>

Thanks

+4  A: 

IE6 does not support rounded corners directly via CSS. You will need to "fake it" with images if you want IE support.

Mike
This is a good option for visitors whose browsers either do not support JavaScript or have JavaScript disabled. +1
lucifer
+5  A: 

IE doesn't support rounded corners in CSS. You can use a JS library like this to do them in IE.

Annie
+1  A: 

That issue is quickly explained: IE 6 doesn't speak CSS3, nor any of the browser-specific pseudo-properties to round corners. You'll have to work around with one of the available rounded corner solutions that fake it using images.

Pekka
A: 

As far as using a JS library for this. Check out Jquery UI

Derek Adair
A: 

There are several approaches but none of them as easy as with CSS3. Do note that CSS3 is not suported n MANY browsers, including IE7 and IE8.

My suggestion is; either forget about rounded corners in IE (it's not fundamental to have those CSS3 effects to have a functional design) or use the same approach for every browser. Note also that IE6 has problems with PNG, use transparent GIFs instead.

One old approach was to use tables, you can do that fairly easily with Photoshop's Slice tool and "save for web". But tables are deprecated for layout.

Javascrip libraries are a good approach.

Camilo Martin
+3  A: 

I would avoid using a library or script to create rounded corners, it's called graceful degradation and is perfectly acceptable for IE6 not to have rounded corners.

As long as your layout isn't breaking in IE6 and the site looks pretty good, something like rounded corners are not worth sweating over.

You'll also find CSS rounded corners don't work in IE7 or IE8 as well.

John Czajka
A: 

You should try http://code.google.com/p/curved-corner/ to curve corners in IE6+. In IE9 the CSS3 declarations will work. Here are some examples how to use htc file to curve corners http://starikovs.com/2010/08/24/css3-rounded-corners/.

Vacheslav