I use the <button>
element which appeares just as plain text with an "+" on right end.
On click a div element expands and reveals some information. I think the button element is semanticaley correct to represent such a ... button ... trigger.
So I have mixed some buttons and h2 elements and I have got a visual problem. After resetting all default user agent style's I expect that every element I introduce to the document looks plain and unstyled.
But the button element does not look that plain. It has an text, slightly, text indention.
First, three elements are <h2><button>text node</button></h2>
and the two from above are just <h2>text node</h2>
* { /*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; }
The other elements use background-image, text-transform:uppercase and that's it. In Firebug there are no paddings,margins,text-indents or other "soft" or "hard" properties which could mess things up. I played around with display settings but it does not "fix" anything or make it worse.
Can anybody explain why, even after resetting the default styles, there is this visual failure on the <button>
element?
Use a semi-colon to separate the different style elements in the HTML button tag. Type color: in the quotation marks after "style=". This element is used to change the text color in the button. You can place style elements in any order in the quotation markers after "style=".
Answer: Use the CSS all Property You can simply use the CSS all property with the value revert to remove the additional author-defined CSS styling for an element (i.e. reset to browser's default CSS styling).
The <input type="reset"> defines a reset button which resets all form values to its initial values. Tip: Avoid reset buttons in your forms!
Use the style. removeProperty() method to remove CSS style properties from an element, e.g. box. style. removeProperty('background-color') .
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
add this one also in css it will solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With