CSS position: static;

CSSWeb DevelopmentFront End Technology

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

raja
Published on 08-May-2018 10:45:41
Advertisements