I'm just wondering why in IE that the button is grey and then when you hover over the button goes blue, it should be blue and then when hover over it goes darker blue.
I've got it working in other browsers but I can't figure out the code for IE.
Thanks in advance.
Here is the CSS:
#mc_embed_signup .button {
background-image: linear-gradient(center top , rgb(95, 176, 244), rgb(70, 130, 180));
background-image: -o-linear-gradient(center top , rgb(95, 176, 244), rgb(70, 130, 180));
background-image: -moz-linear-gradient(center top , rgb(95, 176, 244), rgb(70, 130, 180));
background-image: -webkit-linear-gradient(center top , rgb(95, 176, 244), rgb(70, 130, 180));
background-image: -ms-linear-gradient(center top , rgb(95, 176, 244), rgb(70, 130, 180));
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(1, rgb(95, 176, 244)),
color-stop(1, rgb(70, 130, 180))
);}
And here is the HTML for the button:
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">
It's actually live in the footer of http://www.housebuyfast.co.uk. It's the subscribe button under "Join Our Mailing List Now".
IE9 and earlier does not support standard CSS gradients.
IE10 does support them, and your code should work fine in IE10 (unless it's in compatibility mode).
If you need to use gradients in IE9 or earlier, you have a few options:
Use IE's proprietary -ms-filter style. Something like this:
-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999');
Use a polyfill script like CSS3Pie. This will allow the standard CSS gradients to work in older IE versions.
It is because the version of IE that you are using does not support gradients.
More info at: http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx
Basically it isn't supported until IE10, but as other posters point out there are alternatives.
Use CSS3PIE for makes Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features http://css3pie.com/
Related
My project is to create a video streaming app using NextJS, where I want to display a video and also its subtitles.
Problem:
In Chrome browser the subtitles have a background and I want to remove it (or change its height):
In Firefox or Safari it all works fine.
My code:
margin: auto;
outline-offset: 0.5px;
outline: 100vw solid
rgba(32, 35, 37, 0.85);
background-image: linear-gradient(
to bottom,
rgba(32, 35, 37, 0.85),
rgba(32, 35, 37, 0.85)
);
I also tried background-color but it is not working.
Is there any solution?
The style needs to be backward compatible.
Tried googling -webkit-gradient syntax and figure it out myself, but can't find the document......
So, what's the equivalent -webkit-gradient of this CSS:
background: -webkit-linear-gradient(left, #E0E0E0 0%, #E0E0E0 10%, rgba(255, 255, 255, 0) 11%, rgba(255, 255, 255, 0) 100%),
-webkit-linear-gradient(top, #F9FCF6 0%, #BBE6BF 100%); /* Chrome10+,Safari5.1+ */
Here you go. -webkit-gradient was only used in Chrome 4-9 and Safari 4-5. I'm surprised that it's still supported in the Safari 9:
background:
-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(224,224,224,1)), color-stop(10%, rgba(224,224,224,1)), color-stop(11%, rgba(255,255,255,0)), color-stop(100%, rgba(255,255,255,0))),
-webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(249,252,246,1)), color-stop(100%, rgba(187,230,191,1)));
Demo
Try before buy
The -webkit- is a hack for the Webkit Browser engine. In this case, applied to the linear-gradient CSS property.
Usually, the first thing we must have in mind when using CSS3 is that some old browsers could not support this "new" property (or many others).. So we use the common background always, covering the legacy engines simply.
Together with the property and the -webkit- hack, we have hacks for another old browser engines like Mozilla Firefox, Internet Explorer, Safari and Opera.
Take a look at this example
.some-class{
/* Fallback (could use .jpg/.png alternatively) */
background-color: red;
/* SVG fallback for IE 9 (could be data URI, or could use filter) */
background-image: url(fallback-gradient.svg);
/* Safari 4, Chrome 1-9, iOS 3.2-4.3, Android 2.1-3.0 */
background-image:
-webkit-gradient(linear, left top, right top, from(red), to(#f06d06));
/* Safari 5.1, iOS 5.0-6.1, Chrome 10-25, Android 4.0-4.3 */
background-image:
-webkit-linear-gradient(left, red, #f06d06);
/* Firefox 3.6 - 15 */
background-image:
-moz-linear-gradient(left, red, #f06d06);
/* Opera 11.1 - 12 */
background-image:
-o-linear-gradient(left, red, #f06d06);
/* Opera 15+, Chrome 25+, IE 10+, Firefox 16+, Safari 6.1+, iOS 7+, Android 4.4+ */
background-image:
linear-gradient(to right, red, #f06d06);
}
You can see more explanations at:
https://css-tricks.com/css3-gradients/
And:
http://www.w3schools.com/css/css3_gradients.asp
Hope it helps!
The new standard is to use background-image: linear-gradient().
The following browser versions (or later) support the new 'un-prefixed' version of background-image: linear-gradient():
Chrome: 26
Safari: 6.1
Firefox: 16
Opera: 15
IE: 10
Android: 4.4
iOS: 7.0
If you want to learn more about CSS Gradients, and the new 'un-prefixed' syntax, I'd recommend having a read of this CSS-Tricks article.
I want to create this background in CSS only.
I want to do it with CSS to avoid responsive issues.
You can make use of radial-gradient to produce the glow effect. You can change the colors to be inline with the image.
One thing you should note is the browser support for CSS gradients. IE < 10 do not support them. If you need support for older browsers then CSS gradients would not help.
body {
background-image: radial-gradient(circle, rgb(49, 144, 228) 0%, rgb(29, 84, 166) 100%);
height: 100vh;
}
<!-- prefix free library included only to avoid vendor prefixes -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
I can't see any extra steps in between but if you are looking for several steps of varying percentages then have a look at the below snippet:
body {
background-image: radial-gradient(circle, rgb(49, 144, 228) 0%, rgb(41, 122, 204) 30%, rgb(29, 84, 166) 70%);
height: 100vh;
}
<!-- prefix free library included only to avoid vendor prefixes -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
body background is defined in inline css as
body {
background: radial-gradient( #EAC39F, rgb(255, 208, 160),#CB690C);
}
In real web sites latest Internet Explorer shows horizontal lines in background.
In IE developer tools I turned all other styles in body off, tried 2-color gradient, linear gradient and other colors, but problem persists.
How to force IE to show background without horizontal lines ?
Chrome shows proper background. Also Internet explorer shows proper background if only this style is used. Page
<html>
<head>
<style type="text/css">
body {
background: radial-gradient( #EAC39F, #CB690C);
}
</style>
</head><html><body></body></html>
is shown properly. If there are more elements in page, horizontal lines appear.
How to remove those lines in Internet Explorer ?
jquery and jquery-UI are used in page.
Since IE does not apply height to body, either you apply a fixed height to body or you apply a 100% heightto html tag in your CSS,
and if you don't need the background to repeat, apply, background-repeat:no-repeat.
Also If you are looking for a cross-browser support then you should use the vendors browsers.
Here is a snippet working in IE10+:
html {
height: 100%
}
body {
background: rgba(234, 195, 159, 1);
/* Old Browsers */
background: -moz-radial-gradient(center, ellipse cover, rgba(234, 195, 159, 1) 0%, rgba(203, 104, 12, 1) 100%);
/* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgba(234, 195, 159, 1)), color-stop(100%, rgba(203, 104, 12, 1)));
/* Chrome, Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, rgba(234, 195, 159, 1) 0%, rgba(203, 104, 12, 1) 100%);
/* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, rgba(234, 195, 159, 1) 0%, rgba(203, 104, 12, 1) 100%);
/* Opera 11.10+ */
background: -ms-radial-gradient(center, ellipse cover, rgba(234, 195, 159, 1) 0%, rgba(203, 104, 12, 1) 100%);
/* IE 10+ */
background: radial-gradient(ellipse at center, rgba(234, 195, 159, 1) 0%, rgba(203, 104, 12, 1) 100%);
/* W3C */
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#eac39f', endColorstr='#cb680c', GradientType=1);
/* IE6-9 fallback on horizontal gradient */
background-repeat: no-repeat
}
The issue appears to stem from the fact that IE is not applying a height to the body element. As such the background gets repeated and you see the lines.
By applying
body {
background: radial-gradient( #EAC39F, rgb(255, 208, 160),#CB690C);
}
A similar effect can be seen at http://jsfiddle.net/xpz2tgp9/ in Chrome, IE, etc.
To resolve your issue, apply a specific height to the body element or add a clearing div that will force the body to have height value.
html,body
{
height: 100%;
margin: 0;
padding: 0;
}
See - http://jsfiddle.net/xpz2tgp9/1/
That css is compatible with Firefox, but it isnt with google chrome. In Chrome is transparent!
.hubsimular{
background: url("../img/hub/controls.png") no-repeat top right, -moz-linear-gradient(rgba(208, 208, 208, 1.0), rgba(255, 255, 255, 0.9) 50%, rgba(208, 208, 208, 1.0));
}
The background image is semitransparent, and the color degraded is underneath of the background image.
In this image can see the problem:
http://i.stack.imgur.com/oPyCi.jpg
It's because you're using only -moz-linear-gradient. You need to use -webkit-linear-gradient as well
hubsimular{
background: url("../img/hub/controls.png") no-repeat top right, -moz-linear-gradient(rgba(208, 208, 208, 1.0),-webkit-linear-gradient(rgba(208, 208, 208, 1.0),linear-gradient(rgba(208, 208, 208, 1.0),rgba(255, 255, 255, 0.9) 50%, rgba(208, 208, 208, 1.0)); }
You should have a fall back option and webkit option in addition to moz
Add
-webkit-linear-gradient(left, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);