

- 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
Absolute Positioning with CSS
An element with position: absolute is positioned at the specified coordinates relative to your screen top-left corner.
You can use two values top and left along with the position property to move an HTML element anywhere in the HTML document.
- Move Left - Use a negative value for left.
- Move Right - Use a positive value for left.
- Move Up - Use a negative value for top.
- Move Down - Use a positive value for top.
Example
You can try to run the following code to implement absolute positioning −
<html> <head> </head> <body> <div style = "position:absolute; left:80px; top:20px; background-color:yellow;"> This div has absolute positioning. </div> </body> </html>
- Related Questions & Answers
- Absolute Positioning in CSS
- Absolute Positioning Using CSS
- Relative Positioning with CSS
- Fixed Positioning with CSS
- CSS Positioning Elements
- CSS positioning related properties
- Fixed Positioning in CSS
- Understanding CSS Positioning Methods
- Static Positioning in CSS
- Relative Positioning in CSS
- Static Positioning Using CSS
- Fixed Positioning Using CSS
- Relative Positioning Working in CSS
- CSS Absolute Units
- CSS position: absolute;
Advertisements