CSS position: static;

The position: static; property sets the position of an element static, which is the default.

Example

The top, bottom, left, and right properties does not affect the the static positioned elements. You can try to run the following code to implement the CSS position: static; property

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         div.static {
            position: static;
            border: 3px solid blue;
         }
      </style>
   </head>
   <body>
      <h1>Positioning Element</h1>
         <div class="static">
            div element with position: static;
         </div>
   </body>
</html>

Output

Updated on: 2020-06-22T07:34:21+05:30

275 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements