What is the differe…
 
Notifications
Clear all

What is the difference between absolute and relative unit in CSS ?

2 Posts
3 Users
0 Likes
206 Views
0
Topic starter

What is the difference between absolute and relative unit in CSS ?

2 Answers
0

In CSS, absolute units (like pixels) are fixed and do not change with the screen or other elements. Relative units (like percentages) adjust based on a reference element, making them more flexible and responsive for different screen sizes.

0

The absolute units always indicate a fixed length, while with the relative units the length is always calculated in relation to other elements. Among the absolute units are the inch (in), the centimeter (cm), the millimeter (mm), the point (pt) and the pica (pc).

Share: