

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Static Positioning in CSS
With static positioning, the elements are not affected by the top, bottom, left, and right properties. For this, use position: static.
Example
Let us now see an example −
<!DOCTYPE html> <html> <head> <style> div.static { position: static; color: white; background-color: orange; border: 2px dashed blue; } </style> </head> <body> <h2>Demo Heading</h2> <p>This is demo text.</p> <p>This is demo text.</p> <div class="static"> position: static; </div> <p>This is another demo text.</p> </body> </html>
Output
- Related Questions & Answers
- Static Positioning Using CSS
- CSS Positioning Elements
- Fixed Positioning in CSS
- Absolute Positioning in CSS
- Relative Positioning in CSS
- CSS positioning related properties
- Relative Positioning with CSS
- Absolute Positioning with CSS
- Fixed Positioning with CSS
- Understanding CSS Positioning Methods
- Absolute Positioning Using CSS
- Fixed Positioning Using CSS
- Relative Positioning Working in CSS
- CSS position: static;
- Positioning inside a File in Perl
Advertisements