IE9 fieldset rounded corners
Asked Answered
T

9

18

I cannot seem to make IE9 render a fieldset with rounded corners whereas other browsers do. Has anyone encountered this too ?

Trilly answered 3/1, 2011 at 12:32 Comment(7)
Repeat:#636351Nmr
@digitalFresh: have you read the question? it's about IE9 - and IE9 supports border-radius (as montioned in your link)Pluviometer
@digitalFresh: What does that have to do with this?Trinomial
Huh, the rounded corners don't show up on Opera 11 either.Trinomial
You should report IE9 bugs at connect.microsoft.com/ieWeighting
Sadly, yet unsurprisingly, nearly eight years later this is still an issue with IE11.Petroleum
Does this answer your question? Rounded corners on a fieldsetCollegium
C
23

This happens only if you use <fieldset> with <legend> - without it the corners render ok.

You can fix this bug by applying display:inline or display:inline-block to your <legend> element - but than you have to reposition it back in place by setting position:relative and moving it around.

Depending how the styling of your legend looks like (with background it will look the same - without the background the border of fieldset will still be visible behind the letters) you can make it look pretty much the same as in other normal browsers.

Covert answered 26/10, 2011 at 13:53 Comment(3)
I found that while this did solve the issue in IE, it broke it in chrome. The positioning i had to apply to the legend to move it into the correct place moved it way to far in chrome, was fine in FF and IE though. As a work around i stuck the styles to fix it in IE in an IE only IE only stylesheet. For the record, the style i used was: display: inline-block; position relative; height: 30px; top: -15px;Omeromero
Obviously. This goes to an IE only stylesheet - the question is tagged as internet-explorer - this is a fix for IE - you always want to apply the fix to the buggy browser only.Covert
Check this SO answer for an alternative solution floating <legend> https://mcmap.net/q/499599/-rounded-corners-on-a-fieldsetRosemarierosemary
E
3

From my experence in the latest version of IE9, I can not get a fieldset with legend to have a radius. I have not had any trouble with other borders in IE9, the css3 border-radius works just fine, just fieldset/ledgend. I'm still scratching my head over this.

Exsiccate answered 28/2, 2011 at 3:11 Comment(1)
This seems to be a bug in IE9 release for fieldset + legend, which is irritating to say the least.Psalms
P
3

I too used to use fieldset and for more than just forms, but the constant hit and miss on compatibility has caused me to dump them. Better to write your own CSS DIV Classes that emulate fieldset. Using CSS you can get an exact replica of what fieldset looks like and you have a lot more flexibility and compatibility

Proteiform answered 27/10, 2012 at 19:27 Comment(0)
W
1

its only working in latest rc build , aint working in beta version of IE9 try


.class {
 border-radius-right-bottom: 15px;
}

Whippoorwill answered 22/1, 2011 at 5:31 Comment(1)
It is a good point to re-iterate -- IE9 is not a released product. It's in beta. Don't expect everything to work. And don't use it as your primary browser if you're not prepared for things to break unexpectedly.Porky
R
1

You can add the following meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
Rive answered 15/11, 2011 at 21:33 Comment(0)
K
1

It is still problem under IE11 when using legend , and the solution is in this thread:

Rounded corners on a fieldset

 fieldset {
        margin:20px;
        padding:0 10px 10px;
        border:1px solid #666;
        border-radius:8px;
        box-shadow:0 0 10px #666;
        padding-top:10px;
 }  

legend {
        padding:2px 4px;
        background:#fff; 
    }


    fieldset > legend {
        float:left;
        margin-top:-20px;
    }
    fieldset > legend + * {
        clear:both;
    }

http://www.456bereastreet.com/archive/201302/fieldset_legend_border-radius_and_box-shadow/

Katinakatine answered 9/4, 2015 at 13:44 Comment(0)
G
0

Fieldset rendering is always fraught with problems with rendering and particularly with printing. It's hardly surprising that it doesn't work.

The standard workaround is to add another container and style that.

Genera answered 5/1, 2011 at 3:43 Comment(0)
S
0

To get IE9 to use rounded corners(CSS 3) you have to add this to the HTML header:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

Then use CSS as normal: border-radius-right-bottom:15px;

I had the same issue & this fixed it.

Senegal answered 24/1, 2011 at 13:19 Comment(1)
IE9 should support border-radius by default. If you need to use this, it means you have something in your settings that are making it flip into IE8-compatibility mode. You may want to check the settings. If you do use this technique, then you should be able to get away with just IE=Edge; the rest are irrelevant, since no other browser recognises X-UA-Compatible anyway, and even if they did, why would you want to force them to a given version number (you're fixing a quirk in IE here, not Firefox).Porky
G
0

I had an access only to CSS file, so I could not make any changes in HTML, so I made the hack in CSS for IE.

HTML structure was:

<form>
  <fieldset>
      ...form content...
  </fieldset>
</form>

The whole CSS for all browers and with IE hack:

fieldset {
    border-radius: 20px;
    border: 1px #3D3D3D solid;
}
@media screen and (min-width:0\0) {
    form {
        border: 1px #3D3D3D solid;
        border-radius: 20px;
    }
    fieldset {
        border: 0 none;
        margin-top: 1px;
        margin-bottom: 1px;
    }
}

Of course, if your site has another html-structure, this will not work. Therefore instead "form" you can apply in css to a parent div of your fieldset.

Giliana answered 2/8, 2015 at 18:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.