Tuesday, 13 August 2013

CSS Gradient Buttons showing differently between Chrome and Firefox

CSS Gradient Buttons showing differently between Chrome and Firefox

I've been cracking my brains for a solution for CSS gradient. I was
intending to get the "Add to Carts" button in orange; it's showing the
black one which was set as the "default" for all buttons.
Page
Note:
It's showing the orange colored "Add to Cart" in Chrome. It's Firefox
that's working differently.
-
Code:
.button,
#button,
#submit,
.edit{
margin: 1em 0 1.5em 0;
display: inline-block;
cursor: pointer;
font-size: 1em;
font-weight: normal;
text-align: center;
color: #fff;
padding: 8px 25px;
background: -moz-linear-gradient(
top,
#212121 0%,
#0a0a0a);
background: -webkit-gradient(
linear, left top, left bottom,
from(#212121),
to(#050505));
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #000;
-moz-box-shadow:
0px 1px 2px rgba(000,000,000,0.3),
inset 0px 1px 1px rgba(255,255,255,0.2);
-webkit-box-shadow:
0px 1px 2px rgba(000,000,000,0.3),
inset 0px 1px 1px rgba(255,255,255,0.2);
-webkit-transition-duration: 0.6s;
-moz-transition-duration: 0.6s;
-ms-transition-duration: 0.6s;
-o-transition-duration: 0.6s;
transition-duration: 0.6s;
}
.button:hover,
#button:hover,
#submit:hover,
.edit:hover{
background: -moz-linear-gradient(
top,
#151515 0%,
#151515);
background: -webkit-gradient(
linear, left top, left bottom,
from(#151515),
to(#151515));
-webkit-box-shadow: 0px 0px 8px 5px rgba(222, 222, 222, .95);
-moz-box-shadow: 0px 0px 8px 5px rgba(222, 222, 222, .95);
box-shadow: 0px 0px 8px 5px rgba(222, 222, 222, .95);
}
.add_to_cart_button, .single_add_to_cart_button,
.add_to_cart_button.button, .single_add_to_cart_button.button {
background: -moz-linear-gradient (
top,
#FAB31F 0%,
#F49100) !important;
background: -webkit-gradient(
linear, left top, left bottom,
from(#FAB31F),
to(#F49100)) !important;
border: 1px solid #CE7B00 !important;
}
.add_to_cart_button:hover, .single_add_to_cart_button:hover {
background: -moz-linear-gradient (
top, #F49100 0%,
#F49100);
background: -webkit-gradient(
linear, left top, left bottom,
from(#F49100),
to(#F49100));
border: 1px solid #CE7B00;
-webkit-box-shadow: 0px 0px 8px 5px rgba(253, 213, 128, .75);
-moz-box-shadow: 0px 0px 8px 5px rgba(253, 213, 128, .75);
box-shadow: 0px 0px 8px 5px rgba(253, 213, 128, .75);
}
Hope this could be solved! :)
PSS:
I've tested classes such as:
a.add_to_cart_button
a.add_to_cart_button.button
.add_to_cart_button.button
Along with the "!important" rules for the backgrounds for the
.add_to_cart_button class to no avail.

No comments:

Post a Comment