Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to stop background-color: buttonface; on submit button?

Tags:

css

I have a submit button, which I have styled and looks correct on Safari, Chrome, Firefox and IE, but as soon as I view the site on an iPad this input button has got a slight gradient going through it and has round corners!

I do not know why this is doing this when I reight click it and inspect it and look at some of the default styles (which I am not applying to it I see)

input[type="button" i], input[type="submit" i], input[type="reset" i],         input[type="file" i]::-webkit-file-upload-button, button {
  align-items: flex-start;
  text-align: center;
  cursor: default;
  color: buttontext;
  padding: 2px 6px 3px;
  border: 2px outset buttonface;
  border-image-source: initial;
  border-image-slice: initial;
  border-image-width: initial;
  border-image-outset: initial;
  border-image-repeat: initial;
  background-color: buttonface;
  box-sizing: border-box;
  }

I’m guessing background-color: buttonface; whatever that is is being some how applied to it. How do I stop that? I just want my own solid color.

Any help would be great

like image 317
TF35Lightning Avatar asked Mar 26 '15 13:03

TF35Lightning


People also ask

How do you control background color in HTML?

To add background color in HTML, use the CSS background-color property. Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.

Which property is used to set the background color to the button?

The background-color CSS property sets the background color of an element.

How do you customize a submit button in CSS?

Details of the CSS Code for Your Submit Buttonbackground – sets up the background color behind the text. color – determines the color of your text. border-style – sets the style of your submits button borders. border-color – sets the color of your submit button borders.


2 Answers

Try to add -webkit-appearance: none; on your style.

The browsers apply default style in form elements. You can remove it with the code above.

like image 196
Bluety Avatar answered Sep 21 '22 20:09

Bluety


Or try this css on the specific element:

background-color: transparent;
like image 24
Isaac Pak Avatar answered Sep 22 '22 20:09

Isaac Pak