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

<!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: 2026-03-11T22:50:41+05:30

280 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements