i have to make a anchor <a> , which will look similar to HTML button. but m not able to find the default background color on input type button.
-
1What? This question is not very clear, do you have some code we can see? What do you mean by "default bacground color?" Borwser default or your own default?Kyle– Kyle2013-04-12 08:27:18 +00:00Commented Apr 12, 2013 at 8:27
-
You can use the css3button generator.Vucko– Vucko2013-04-12 08:29:16 +00:00Commented Apr 12, 2013 at 8:29
-
2i think there is no default button color, every browser renders the button as it wants.Imperative– Imperative2013-04-12 08:30:26 +00:00Commented Apr 12, 2013 at 8:30
5 Answers
Firefox uses a scaled grey - from RGB(112,112,112) #707070 at the darkest point to RGB(252,252,252) #FCFCFC at it's lightest.
Something like this might come close:
/* Note: This gradient may render differently in browsers that don't support the unprefixed gradient syntax */
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(top left, #707070 -50%, #FCFCFC 110.00000000000001%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top left, #707070 -50%, #FCFCFC 110.00000000000001%);
/* Opera */
background-image: -o-linear-gradient(top left, #707070 -50%, #FCFCFC 110.00000000000001%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, right bottom, color-stop(-.5, #707070), color-stop(1.1, #FCFCFC));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(top left, #707070 -50%, #FCFCFC 110.00000000000001%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to bottom right, #707070 -50%, #FCFCFC 110.00000000000001%);
But you'll probably want to play around with one of the various CSS tools out there to get it just right.
Comments
The "default" colour of controls on web pages is different depending on which browser you are using and which operating system you are using. Mac controls look very different to PC controls in IE. Phones will also show controls differently.
The best way to get them to look the same is to style them through css so choose a colour from your favourite browser.
1 Comment
#f0f0f0 is the default hex code of html button tag.
1 Comment
Default button color in Chrome is HEX: #f0f0f0