Course Content
Introduction
Introduction to CSS course
0/1
CSS Syntax
0/1
CSS Selectors
0/1
CSS Unit of Measurements
CSS units are used to specify measurements for various properties such as length, width, margin, padding, font size, and more.
0/1
CSS Colors
CSS provides various ways to specify colors.
0/2
CSS Properties And Values
0/1
CSS Background
0/1
CSS Box Model
0/1
CSS Display
CSS display property is used to control how an element is displayed on the webpage.
0/3
Typography and Font Properties
0/1
CSS Display And Positioning
0/2
Responsive Design with CSS Media Queries
0/1
About Lesson

CSS Positioning:

The position property in CSS controls the positioning of an element. It specifies how an element should be positioned on the web page. CSS provides several position property values including:

Static: This value is the default position value and places the element in the normal flow of the web page.

Relative: This value positions the element relative to its normal position in the web page flow. The element’s position can be adjusted using the top, bottom, left, and right properties.

Absolute: This value positions the element relative to its nearest positioned ancestor. If there is no positioned ancestor, the element is positioned relative to the initial containing block. The element’s position can be adjusted using the top, bottom, left, and right properties.

Fixed: This value positions the element relative to the viewport, which means the element stays in the same place even if the user scrolls the web page. The element’s position can be adjusted using the top, bottom, left, and right properties.

By using CSS display and positioning properties, web developers can create complex and dynamic layouts for web pages that adjust to different screen sizes and device types.