Reputation: 105
My styles for border radius and background gradients are not appearing in IE8. The size of the overall container is also different in IE8.
I have tried CSS PIE and that also failed to work.
Looking forward to receive any help on this issue. Please help me out.
Thank you all in advance for your hints.
.Quor_Widget_buttondescription0 //Add To Order Button
{
position:relative;
width:90%;
font-size: 24px;
height:47px;
overflow:hidden;
margin:8px 8px 5px;
border:1px solid #000000;
text-align: center;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
-moz-box-shadow:0 0 3px rgba(0,0,0,0.5);
-webkit-box-shadow:0 0 3px rgba(0,0,0,0.5);
box-shadow:0 0 3px rgba(0,0,0,0.5);
color:#000000;
font:bold, Helvetica, Arial, sans-serif;
cursor:pointer;
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc0NjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiM2N0JBNjciIG9mZnNldD0iIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzBGQTkwRiIgb2Zmc2V0PSIiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnNDYxKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(#0FA90F, #67BA67);
behavior: url(PIE.htc);
display: inline-block;
}
// Choices button -- Under size tag
.segmented-button-count3 {
background: transparent;
padding: 1px;
}
.segmented-button-count3 input[type="radio"] {
width: 0px;
height: 0px;
display: none;
}
.segmented-button-count3 label {
width:33.3%;
height:20px;
padding-top: 4px;
padding-bottom: 1px;
overflow: hidden;
white-space: nowrap;
display: block;
text-overflow: ellipsis;
display: -moz-inline-box;
-moz-box-orient: vertical;
display: inline-block;
vertical-align: middle;
vertical-align: auto;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-ms-border-radius: 10px;
-khtml-border-radius: 10px;
border-radius: 10px;
text-shadow: white;
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9ImczNjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjEwMCUiIHkyPSIxMDAlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZCRkJGQiIgb2Zmc2V0PSIwIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0M5QzlDOSIgb2Zmc2V0PSIxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZzM2MSkiIC8+Cjwvc3ZnPg==);
background-repeat: no-repeat;
background-size:100%;
-webkit-box-shadow: inset 0 -4px 7px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255, 0.3), inset 0 1px 0 rgba(255,255,255, 0.3);
-moz-box-shadow: inset 0 -8px 10px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255, 0.3), inset 0 1px 0 rgba(255,255,255, 0.3);
box-shadow: inset 0 -8px 10px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255, 0.3), inset 0 1px 0 rgba(255,255,255, 0.3);
background: -moz-linear-gradient(#fbfbfb, #c9c9c9);
border: 1px solid #b2b2b2;
color: 000000;
font-size: 13px;
cursor: pointer;
font-family: Helvetica;
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
-o-border-radius: 0px;
-ms-border-radius: 0px;
-khtml-border-radius: 0px;
border-radius: 0px;
margin-right: -5px;
}
.segmented-button-count3 label {
*display: inline;
}
.segmented-button-count3 label:hover {
-moz-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
-o-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.1);
color: #333333;
}
.segmented-button-count3 label:active, .segmented-button-count3 label.active {
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9ImcyMDYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiMyRDYyQkUiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiM2Q0E1RjUiIG9mZnNldD0iMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2cyMDYpIiAvPgo8L3N2Zz4=);
background-repeat: no-repeat;
background-size:100%;
background: -moz-linear-gradient(#2d62be, #6ca5f5);
}
.segmented-button-count3 label.first {
-moz-border-radius-topleft: 10px;
-webkit-border-top-left-radius: 10px;
-o-border-top-left-radius: 10px;
-ms-border-top-left-radius: 10px;
-khtml-border-top-left-radius: 10px;
border-top-left-radius: 10px;
-moz-border-radius-bottomleft: 10px;
-webkit-border-bottom-left-radius: 10px;
-o-border-bottom-left-radius: 10px;
-ms-border-bottom-left-radius: 10px;
-khtml-border-bottom-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.segmented-button-count3 label.last {
-moz-border-radius-topright: 10px;
-webkit-border-top-right-radius: 10px;
-o-border-top-right-radius: 10px;
-ms-border-top-right-radius: 10px;
-khtml-border-top-right-radius: 10px;
border-top-right-radius: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-right-radius: 10px;
-o-border-bottom-right-radius: 10px;
-ms-border-bottom-right-radius: 10px;
-khtml-border-bottom-right-radius: 10px;
border-bottom-right-radius: 10px;
}
.segmented-button-count3 input:checked + label, .segmented-button-count3 label.selected {
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9ImcyMDYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiMyRDYyQkUiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiM2Q0E1RjUiIG9mZnNldD0iMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2cyMDYpIiAvPgo8L3N2Zz4=);
background-repeat: no-repeat;
background-size:100%;
background: -moz-linear-gradient(#2d62be, #6ca5f5);
}
Upvotes: 1
Views: 1133
Reputation: 4954
Answer: To achieve border-radius, box-shadow and gradient backgrounds in IE6-9, CSS3 PIE can be used. As SDC mentioned, you may want to make sure that the PIE.htc file is actually getting loaded. An example:
.button {
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-webkit-box-shadow: #888 5px 5px 5px;
-moz-box-shadow: #888 5px 5px 5px;
box-shadow: #888 5px 5px 5px;
background: #444; /* Single-color fallback */
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#444), to(#CCC)); /* Chrome, Safari 4+ */
background: -webkit-linear-gradient(#444, #CCC); /* Chrome 10+, Safari 5.1+ */
background: -moz-linear-gradient(#444, #CCC); /* FF 3.6+ */
background: -ms-linear-gradient(#444, #CCC); /* IE10+ */
background: -o-linear-gradient(#444, #CCC); /* Opera 11.10+ */
background: linear-gradient(#444, #CCC); /* W3C */
-pie-background: linear-gradient(#444, #CCC); /* For CSS3 PIE */
behavior: url(PIE.htc); /* Also for CSS3 PIE */
}
Best Practices: You may want to consider re-writing your CSS. There are a lot of duplicate and unnecessary properties and hacks to make the code work in specific browsers. One easy way to start with consistency across browsers is to use a CSS reset such as Normalize.css.
Upvotes: 1
Reputation: 14212
It's clear from the screenshot that CSS3Pie isn't being run at all. I suggest reading through the common problems and known issues listed on the CSS3Pie website; It looks like you're probably falling foul of one of them.
In particular, you should check that the PIE.htc file is being loaded at all, and that it's being served with the correct mime type. (see IE8's dev tools window to see what URLs are loaded)
The first point there -- if the file isn't being loaded at all, it might be loading the wrong URL. IE can get it wrong when given a relative URL for a htc file; it would be a good idea to change it to an absolute URL; eg /PIE.htc
rather than just PIE.htc
. This is discussed in the known issues page.
The second point is also discussed on the known issues page. Some web servers may not serve the htc file with the correct mime type. IE will completely ignore it if it isn't served as text/x-component
. Check the http headers that are sent when you download the file.
Upvotes: 1
Reputation: 7159
Internet Explorer 8 does not have native support for SVG. It has little or no support for CSS3 properties such as border-radius
.
The best solution is probably to make a separate stylesheet for IE8 with custom styles (e.g. JPG backgrounds instead of SVG) and show that only with IE8.
You should also have a look at Modernizr.
Or, force the user to use a real web browser ;-)
Upvotes: 2