5

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.

3
  • 1
    What? 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? Commented Apr 12, 2013 at 8:27
  • You can use the css3button generator. Commented Apr 12, 2013 at 8:29
  • 2
    i think there is no default button color, every browser renders the button as it wants. Commented Apr 12, 2013 at 8:30

5 Answers 5

8

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.

Sign up to request clarification or add additional context in comments.

Comments

3

As per: the standard

Use system-color keywords:

ButtonFace: The face background color for push buttons.

1 Comment

could find what is the color for button on hover in the link. maybe you know what is it?
2

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

Not to mention that color will also vary according to OS theme or skin.
1

#f0f0f0 is the default hex code of html button tag.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
1

Default button color in Chrome is HEX: #f0f0f0

1 Comment

What does this add to this answer, posted over a year ago?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.