css - How to reset all default styles of the HTML5 button element -
scenario
i use <button>
element appeares plain text "+" on right end.
on click div element expands , reveals information. think button element semanticaley correct represent such ... button ... trigger.
problem
so have mixed buttons , h2 elements , have got visual problem. after resetting default user agent style's expect every element introduce document looks plain , unstyled.
but button element not plain. has text, slightly, text indention.
example
first, 3 elements <h2><button>text node</button></h2>
, 2 above <h2>text node</h2>
css
* { /*reset's every elements apperance*/ background: none repeat scroll 0 0 transparent; border: medium none; border-spacing: 0; color: #26589f; font-family: 'pt sans narrow',sans-serif; font-size: 16px; font-weight: normal; line-height: 1.42rem; list-style: none outside none; margin: 0; padding: 0; text-align: left; text-decoration: none; text-indent: 0; }
other element's css
the other elements use background-image, text-transform:uppercase , that's it. in firebug there no paddings,margins,text-indents or other "soft" or "hard" properties mess things up. played around display settings not "fix" or make worse.
question
can explain why, after resetting default styles, there visual failure on <button>
element?
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
add 1 in css solve problem.
Comments
Post a Comment