Support Forum
Hi folks,
When I inspect the code for the a.spButton I find this
#spMainContainer a.spButton {
width: auto;
height: 21px;
text-align: center;
line-height: 1.6em;
padding: 1px 7px;
margin: 2px;
font-size: 100%;
font-family: inherit;
outline-style: none;
color: #000;
text-decoration: none;
cursor: pointer;
background: -moz-linear-gradient(100% 100% 90deg, #CFDFEE, #F9FBFC) repeat scroll 0% 0% #F9FBFC;
border: 1px solid #0075B0;
border-radius: 5px;
}
But when I go to the .css file to modify the background colors I find this
#spMainContainer a.spButton {
width: auto;
height: 21px;
text-align: center;
line-height: 1.6em;
padding: 1px 7px;
margin: 2px 2px;
font-size: 100%;
font-family: inherit;
outline-style: none;
color: #000;
text-decoration: none;
cursor: pointer;
background: -moz-linear-gradient(100% 100% 90deg, #cfdfee, #f9fbfc);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9fbfc), to(#cfdfee));
background: -ms-linear-gradient(top, #f9fbfc 0%,#cfdfee 100%);
background: -o-linear-gradient(top, #f9fbfc 0%,#cfdfee 100%);
background: linear-gradient(top, #f9fbfc, #cfdfee);
background-color: #f9fbfc;
border: 1px solid #0075B0;
-webkit-border-radius: 5px; border-radius: 5px;
}
Why are there so many lines regarding the background? For browser compatibility?
If I'm going to use a solid background with no gradients can I delete all of the background lines and put something like this in their place
background-color: 93A0AF;
and leave it at that?
Thanks,
Bart
Hey Bart,
Sure.. Basically we put the rules in place as people will be using various browsers, and various versions of browsers that require different rules, so they are really there just in case. The reason you only see one background call in the inspection is because the browser picks the most relevant one and disregards the rest.
However, using 'background:' and just going with a straight colour is safe all round. I think background-color works the same, but 'background' is definitely recognised in all browsers. Something like:
background: 93a0af;
good to hear... thanks for the update...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)