html - CSS style submit like href tag -
i have button
class wrote in css. displays block, adds styles, etc. whenever add class a
tags, works fine - tag spans entire width of container display:block
should do... however, when add button
class input
button, chrome, safari, , firefox add margin-right: 3px
...
i've used dom inspector in both chrome , safari , no should adding 3px padding.
i tried adding margin: 0 !important;
and/or margin-right: 0 !important
button
class in css, browser still renders 3px right margin!
is known issue, , there css-based solution (i.e. not jquery/javascript)
code follows:
.button { position: relative; display: block; margin: 0; border: 1px solid #369; color: #fff; font-weight: bold; padding: 11px 20px; line-height: 18px; text-align: center; text-transform: uppercase; cursor: hand; cursor: pointer; }
yes, <input>
element has number of oddities. possible, use <button>
element instead, that's lot more reliable.
Comments
Post a Comment