I used rounded corner and gradient. it's working good on firefox but rounded corner not working on IE. IE rounded corner only working when I remove gradient css. Please help me.
<h2 id="user_comments">9. User Comments and Notes</h2>
h2 {
-webkit-border-radius: 8px;
-moz-border-radius:8px;
background:-moz-linear-gradient(center top , #A0ABBF, #DEDEDE, #A0ABBF) repeat scroll 0 0 #A0ABBF;
filter: progid:DXImageTransform.Microsoft.gradient(StartColorStr='#DEDEDE', EndColorStr='#A0ABBF'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#DEDEDE', EndColorStr='#A0ABBF')"; /* IE8 */
border:2px solid #A0ABBF;
font-size:16px;
letter-spacing:1px;
margin-top:36px;
padding:0 1em;
position:relative;
}
Firefox:
IE:
IE7 and IE8 don't support border-radius.
IE9 will.
There are JavaScript hacks, most involve a heap of 1px elements absolutely positioned or use SVG.
You can also images.
I'd just leave it as is, and consider > IE8 and other browsers are getting the progressive enhancement.
Related
Why is this CSS being applied inconsistently across frameworks/environments/browsers?
I've got a prototype created in Meteor where the CSS works fine in creating a shadow effect and adding a border to various images as they are hovered; specifically, in the Meteor prototype (it's a Sharepoint app, but testing features like this out is much quicker with Meteor) I have this CSS:
#imgPostTravelTop:hover, #imgPostTravelTopRight:hover, #imgPostTravelCenter:hover, #imgPostTravelBottom:hover {
z-index: 4;
-moz-box-shadow: 0 0 7px #000;
-webkit-box-shadow: 0 0 7px #000;
box-shadow: 0 0 7px #000;
border: 1px solid gold;
}
It works fine - on mouseenter / hovering into an image, it grows a golden five O'Clock shadow.
However, virtually the same thing in the Sharepoint code:
.finaff-form-help-post-travel-centerimage:hover,
.finaff-form-help-post-travel-bottomimage:hover {
z-index: 4;
-moz-box-shadow: inset 0 0 7px #000;
-webkit-box-shadow: inset 0 0 7px #000;
box-shadow: inset 0 0 7px #000;
border: 1px solid gold;
}
...only works in Chrome and Firefox (not in IE8).
I tried this, which supposedly works in IE8:
#imgPostTravel:hover {
zoom: 1;
filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=5, OffY=5, Color=#ff0000);
}
...but it doesn't work (does not add a box-shadow to IE8).
Is there anything I can to do get a box-shadow to work in IE8?
You can try #thirtydot answer:
Use CSS3 PIE, which emulates some CSS3 properties in older versions of IE.
It supports box-shadow (except for the inset keyword).
EDIT:
or you can try #Marcus Pope answer :
filter:
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=0,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=45,strength=2),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=90,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=135,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=180,strength=10),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=225,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=270,strength=5),
progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=315,strength=2);
Possible duplicate of
Box shadow in IE7 and IE8
CSS3 Box Shadow Effect for IE8?
You are trying to make an inset boxshadow in Internet Explorer 5.5 through 8.
This is completely possible.
Here is a code example with explanations:
(THIS WILL ONLY SHOW UP RIGHT IN INTERNET EXPLORER 5.5 - 8):
#box {
/* Make sure to set it to min-width so you can push the outside "Microsoft Shadow" out of the screen to the left, right, bottom, and top, because the shadow adds pixels to the 100% width whether you set it to width:100% or not, but if you set it to 100% width, you won't be able to make the margin push the outside shadow out. */
min-width: 100%;
/* For some reason, the above rule is not the case for height. I'm not sure why for Internet Explorer. */
height:100%;
position: relative;
/* I discoverd the shadow won't even appear unless there is a boder of the same div. That's no big deal, just push the boder out too, along with the bleeding outside Mirosoft Shadow". */
border: solid 1px black;
zoom: 1;
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#aaaaaa, Strength=33, Direction=0),
progid:DXImageTransform.Microsoft.Shadow(Color=#aaaaaa, Strength=33, Direction=90),
progid:DXImageTransform.Microsoft.Shadow(Color=#aaaaaa, Strength=33, Direction=180),
progid:DXImageTransform.Microsoft.Shadow(Color=#aaaaaa, Strength=33, Direction=270);
/* For the child, (child id is called "box")... you can only push out the content to the bottom and right, because of the natural left to right, top to bottom HTML layout. */
margin-bottom: -39px;
margin-right:130px;
}
.box-parent-fix {
/* This appears to be a hack as far as I know, the bleeding Microsoft Shadow (not the inset part, the outside part is what I'm talking about) will only be pushed out if it has a parent with the follow CSS: */
position: relative;
min-width: 100%;
height: 100%;
}
.box-parent {
/* For the child, (child id is called "box")... you can only push out the content to the bottom and right, because of the natural left to right, top to bottom HTML layout. */
margin-top:-49px;
margin-left:-45px;
height:100%;
min-width:100%;
background-color: white;
position: relative;
}
body {
position: relative;
height: 100%;
min-width:100%;
/* This hides the pushed out bleeding non-inset Microsoft Shadow. Please excuse my ugly sentence, haha. */
overflow-y: hidden;
overflow-x: hidden;
}
<body>
<div class="box-parent-fix">
<div class="box-parent">
<div id="box">
</div>
</div>
</div>
</body>
Here is a screenshot of it working in Internet Explorer 6:
Here is a screenshot of it working in Internet Explorer 8:
I have a page with a google maps in it, now I'm trying to make a border radius on it. This is working in browsers like Chrome and Firefox but not working on safari.
You can find the page here: clients.steven-dejong.nl/amano/#contact
EDIT:
It's working with the address block and if I add -webkit-border-radius and -moz-border-radius it makes no sense.
The only part where my border radius isn't working is the google maps container
Border Radius to Google Map in Safari
-webkit-mask-image: -webkit-radial-gradient(circle, white, black);
-webkit-transform: translateZ(0);
Use this snippet to both the map iframe and its parent div
Use the -webkit prefix and do something like below:
/* Safari 3-4, iOS 1-3.2, Android 1.6- */
-webkit-border-radius: 12px; /* Adjust as needed */
To make it work in all browsers:
border-radius: 12px;
-moz-border-radius: 12px;
-webkit-border-radius: 12px;
I need a hack to tarjet internet explorer lower to 9, or to be more specific; i need a inline CSS hack to tarjet non CSS3 capable browsers
_prop:val -> ie6
*prop:val -> ie6 & ie7
????????? -> ie8 & ie7 & ie8
I am using gradients and images for those browsers, but ie8 does not support it... so i want to load the alternate image only if necessary
(please avoid answers suggesting to use external stylesheet using conditional coments or using javascript. I know that this code would be invalid, but its just for one little thing. Plus i am curious to know if its posible :) )
You don't need a hack, since no current browser supports all of CSS3.
Instead, simply specify fallback properties for older browsers, like this:
#selector {
background: url("gradient.png");
background: gradient(...);
}
I am using gradients in IE8 in a project. It does work !
<style>
#gradient {
color: #fff;
height: 100px;
padding: 10px;
/* For WebKit (Safari, Google Chrome etc) */
background: -webkit-gradient(linear, left top, left bottom, from(#00f), to(#fff));
/* For Mozilla/Gecko (Firefox etc) */
background: -moz-linear-gradient(top, #00f, #fff);
/* For Internet Explorer 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF);
/* For Internet Explorer 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FF0000FF, endColorstr=#FFFFFFFF)";
}
</style>
for box shadow there seems to be a workaround like this:
.shadow {
zoom: 1;
filter: progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=0, Strength=3)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=45, Strength=2)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=90, Strength=3)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=135, Strength=2)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=180, Strength=3)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=225, Strength=2)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=260, Strength=3)
progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=305, Strength=2);
-moz-box-shadow: 0 0 5px #222; /*Mozilla-basierte Browser (z.B. Firefox)*/
-webkit-box-shadow: 0 0 5px #222; /*WebKit-basierte Browser (z.B. Safari/Chrome)*/
box-shadow: 0 0 5px #222; /*CSS3 Standard*/
}
for border-radius there is no support until ie9, as far as I know. I'm using several jQuery plugins to achieve border-radius in IE. hope this code helped you !
You need to use this:
prop: val\9
Putting \9 directly at the end of any value will target just IE8 and below
I am using the following bit of CSS to create a linear background gradient. It seems to work just fine in IE8/9, FF, Safari and chrome but not in IE7. IE7 shows a solid (green) background. Here is my code
.menu_body a {
display:block;
color:#006699;
background: #008800;
/* Mozilla: */
background: -moz-linear-gradient(top, #0b71a4, #025f8e);
/* Chrome, Safari:*/
background: -webkit-gradient(linear,
left top, left bottom, from(#0b71a4), to(#025f8e));
/* MSIE */
filter: progid:DXImageTransform.Microsoft.Gradient(
StartColorStr='#0b71a4', EndColorStr='#025f8e', GradientType=0);
padding: 1px 18px;
}
In IE<=7, filters won't work unless element has layout.
zoom: 1;
Be aware that it can break other things, so old good background-image might be safe and reliable solution.
Also please note that your CSS lacks gradient properties for Opera, IE10 and updated syntax for Webkit.
The correct syntax is:
filter: progid:DXImageTransform.Microsoft.gradient
(startColorstr=#550000FF, endColorstr=#55FFFF00)
This is supported by IE4>
See the MSDN source here.
I'm unsure if the parameters of this transform are case sensitive - but seeing as most other CSS is, you could try:
startColorstr='#0b71a4', endColorstr='#025f8e'
Notice the lower-case starting character, and lower-case str suffix.
I was long using this to add a glow to focused fields, I accessed my page from Firefox for the first time and realized it doesn't work on it, and most likely not on explorer either.
border: 1px solid #E68D29;
outline-color: -webkit-focus-ring-color;
outline-offset: -2px;
outline-style: auto;
outline-width: 5px;
I had copy pasted it from another page so I'm not quite sure how it works. What is the equivalent for Firefox or Explorer? I mean how do I make a similar glow in other browsers? Thanks
Webkit treats "outline-style: auto;" differently than other browsers. If you want to get behavior that's more similar across browsers I'd recommend you use box-shadow instead. It won't apply to older browsers (IE8 and earlier, or FF3.0 and earlier) but otherwise should be the same.
Using this code
input {
border: 1px solid #E68D29;
}
input.focus {
border-color: #439ADC;
box-shadow: 0 0 5px #439ADC; /* IE9, Chrome 10+, FF4.0+, Opera 10.9+ */
-webkit-box-shadow: 0 0 5px #439ADC; /* Saf3.0+, Chrome */
-moz-box-shadow: 0 0 5px #439ADC; /* FF3.5+ */
}
I was able to produce a result that shows cross-browser glow in IE9+, FF4+, Chrome 10+, and Safari 5+.
Option 2) You could experiment with using some combination of outline (which will show in Webkit) and box-shadow (for other browsers).
Option 3) Use a library like Formalize CSS to take care of the cross-platform input styling for you. The results are pretty impressive.