Buttons too tall on Firefox
Found another user who used this:
input::-moz-focus-inner /*Remove button padding in FF*/
{
border: 0;
padding: 0;
}
http://jsfiddle.net/MCAllinder/dehda/2/
Buttons too tall on Firefox
Found another user who used this:
input::-moz-focus-inner /*Remove button padding in FF*/
{
border: 0;
padding: 0;
}
http://jsfiddle.net/MCAllinder/dehda/2/
Link and button height not the same in Firefox
Firefox appears to render the height of input elements differently than other browsers. This is very annoying but the code below explains about how to remove the added height.
I did some research and figured it out. It appears to be a bug with Firefox. Here is a another question which covers it Buttons too tall on Firefox. Here is an article which explains with more information http://davidwalsh.name/firefox-buttons.
Here is a jsfiddle https://jsfiddle.net/www139/e9gg7ncu/2/.
Here is a code snippet (remember that this is only relevant to the Firefox browser).
input[type="submit"], a:link, a:visited { background-color: #4eb4df; border: none; font-family: arial; color: #ffffff; border-radius: 4px; padding: 5px 20px; font-size: 1.2em; text-shadow: 1px 1px #6d6d6d; display: inline-block; margin: 30px auto 10px; text-transform: uppercase; text-decoration: none; font-size:1em;}input[type="submit"]:hover, input[type="submit"]:active, a:hover, a:active { background-color: #3e94b9;}input::-moz-focus-inner /*Remove button padding in FF*/{ border: 0; padding: 0;}
<input type="submit" value="Input"> <a href="#">Link</a>
Why do buttons look larger in Safari as compared to FireFox, IE8, and Chrome?
To smooth out the vendor-specific default CSS, it's common practice to use a "CSS reset."
Personally, I like the one in YUI. From the site:
The foundational CSS Reset removes the inconsistent styling of HTML elements provided by browsers. This creates a dependably flat foundation to built upon. With CSS Reset loaded, write explicit CSS your project needs.
Assuming your reset stylesheet is "good," then the vast majority of cross-browser differences, like your button size issue, will be eliminated.
How big should a Firefox toolbar button be?
Not sure how I found it, but the Creating toolbar buttons article at the Mozilla Developer Center defines Firefox big icon size as 24x24 and small icon size as 16x16.
web page rendering mystery: button too wide
You are calculating the width of your buttons by adding their width and their border-width. However, now browsers default to border-box
for property box-sizing
on buttons.
https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing
A quick fix is to add box-sizing: content-box;
to .button
so that reality matches what you expect about calculating widths.
Another fix would be to remove the two +2px
from the second calc()
; borders being part of the width of a button, you only want your second button to be "2 buttons + 1 margin". The first button is unchanged because you actually want it to be "1 button + 1 margin + 2 borders" so it'll work with both border-box and content-box.
How to style firefox toolbarbutton with type=menu
So you want your button to look like one of the standard Firefox buttons? Sadly only one of the standard Firefox buttons use type="menu", and for some reason known only to themselves they worked around their own bug here, here and again here... I suggest you do the same in your own CSS.
Related Topics
Differencebetween Bootstrap.CSS and Bootstrap-Theme.Css
CSS White Space at Bottom of Page Despite Having Both Min-Height and Height Tag
Angular2 Styling Issues Caused by Dom Attributes _Ngcontent-* VS. _Nghost-*
Aptana Studio 3 Code Assist for SASS (.Scss) Files
How to Prevent the Floating Layout Wrapping When Firefox Zoom Is Reduced
Wrapping Text Around a Div with CSS
Create a Percentage Circle with CSS
Twitter Bootstrap - Full Width Navbar
Should We Put <Input> Inside <Label>
Can Text Be Hidden and Shown Using Just CSS (No JavaScript Code)
Prevent Wrapping of Menu Items
Wrap a .Less CSS Definitions in a Namespace
Semantic Grid with Bootstrap + Less Mixins ¿ How
Css3 Animation - Smooth Infinite Cycle
How to Add Padding or Border to a Div and Keep Width and Height