Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: Safari on Mac doesn't adhere to my Submit Button style

Tags:

css

macos

I have applied the following CSS to a FORM submit button:

font:normal 15px helvetica,arial,sans-serif;
padding:6px;

On Windows, regardless of the browser (IE/Firefox/Chrome), this increase the FORM submit button and give the button spacing padding of 6px.

However, on OS X (Mac), the form submit button is not stylized at all. Meaning, the font size is the default and no padding is being applied.

Any idea on how I can make a FORM submit button bigger on OS X (Mac)?

like image 668
Teddi Avatar asked Nov 05 '09 16:11

Teddi


People also ask

Can you style a Submit button with CSS?

You can now customize your submit button using custom CSS.


3 Answers

You need to add this to your CSS:

input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
like image 127
Sergey Avatar answered Sep 21 '22 15:09

Sergey


In Safari 4, padding and sizes won't take effect on submit buttons unless you set a background or border. Example:

background: #ccc; /* without this, the other styles won't show up */    
font: normal 15px helvetica,arial,sans-serif;
padding: 6px;
like image 29
Justin Kramer Avatar answered Sep 20 '22 15:09

Justin Kramer


Instead of using <input type="submit" /> use <button type="submit">Submit Text</button>, if I remember correctly, this has much better support for css stylings.

like image 43
Jordan S. Jones Avatar answered Sep 20 '22 15:09

Jordan S. Jones