I installed Thank you plugin but the button on my test site looks strange.
I found out why. Because it inherits #commentform textarea { width: 45%; }
from my theme. If I remove the width from css the button looks ok. Any idea how I can fix that? Of course I do not want to remove width for #commentform textarea. Can I do something about that on css level of the button? Something like width:not-inherit; width:reset;
I'd say that the width of the button wouldn't be declared at all if there was no #commentform textarea
Inheritance in CSS occurs when an inheritable property is not set on an element. It goes up in its parent chain to set the property value to its parent value. CSS properties such as height , width , border , margin , padding , etc. are not inherited.
initial - Sets the height/width to its default value. inherit - The height/width will be inherited from its parent value.
The inherit CSS keyword causes the element to take the computed value of the property from its parent element. It can be applied to any CSS property, including the CSS shorthand property all . For inherited properties, this reinforces the default behavior, and is only needed to override another rule.
Try putting
width: auto;
on the button. That should fix it in this case.
It is an old question but I just had the same problem with width
inherit from parent as 100%. Turns out adding display
property to inline-block
helps.
display: inline-block;
you can add "!important" to the newer css.
ex :
first{ float:right;}
second{ float:left !important;}
<div class="first second"></div>
This div should be float left
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