0 0 Votes

CSS: Reset property "position"

Question by Compi | 21/02/2016 at 11:33

I have created a class within and external stylesheet in which I have declared some CSS properties.

However, I would like to reset some of those properties to their defaults on one of my HTML pages using Inline-CSS. Among others, this also applies to the property "position". In my external stylesheet, I have set "position" to "fixed" and now I would like to reset it to its default behavior.

But what actually is the default value for "position"? I can exclude the values "absolute", "relative" and "fixed". So, should I reset to "initial", "inherit" or "static" to restore the default? I cannot see any difference between them.

ReplyPositiveNegative

Stefan Trost

Show Profile | Message
Avatar
0Best Answer
0 Votes

The default property of "position" is "static".

So, you can change your HTML in the following way:

<div class="myclass" style="position:static">
   
</div>

This overwrites the "position" that might be defined in "myclass" with the default value.
21/02/2016 at 17:28

ReplyPositive Negative
Reply

Related Topics

"G" or "E" sign on my mobile
Question | 1 Answer

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.