Violation of the wording of the OP:
We want to remove the style (i.e. the style has already been applied to the element, and we want to delete it) without any classes or identifier (for example: HTML does not need to be touched).
First of all, how do we "reset" some CSS properties that have already been inherited by an element?
This requires some knowledge of the default values:
width: auto; // the default for sizes is auto
But also some research regarding the rest of your css, because a reset stylesheet may be included in your project, in which all elements everywhere behave differently (this usually applies to paddings / margin / border, etc.).
Now that we know how to βresetβ CSS properties, we need to identify the element to which we apply this βresetβ.
We can use :nth-child() , a CSS3 pseudo-selector that finds children that occupy the nth offset inside the parent, regardless of the type of element.
Put it together and we have:
button:nth-child(3) { width: auto; height: auto; background: none; }
Ignoring OP wording, but offering a better solution:
Try the latest Try Connors fiddle for maximum efficiency and elegance, or for the first compatibility.
source share