Learn HTML
CSS Introduction
CSS Basic Syntax
CSS Selector
CSS Units
CSS Text
CSS Border
CSS Outline
CSS Padding
CSS Margin
CSS Height & Width
CSS Overflow
CSS Resize
CSS Background
CSS Box Sizing
CSS Position
CSS Float
CSS Clear
CSS Clip Path & Shape Outside
CSS Display
CSS Media Queries
CSS Pseudo Classes & Elements
CSS Filter
CSS Transition
CSS Transform
CSS Animation
CSS List Style
CSS Table
CSS Scrollbar Styling
CSS Icon
CSS Cursor
CSS Variable & Calc
CSS User Select
CSS Flexbox
Learn Javascript
Learn Django
Unit name | Description |
---|---|
px | pixels. It means fixed |
% | Percentage. |
em |
It's means take the unit value of parent element. If the unit value of parent element is 15px then it will
take 15px as current element unit value. Now if we write 1em it means parent element unit_value*1. In this case 15*1=15. Now if we write 2em it means parent element unit_value*2. In this case 15*2=30. Now for 100em means 15*100. |
rem |
This unit value works according to browser default unit value. For example the default font-size of a browser is 16px. So it will take 16 pixel. Now if we write 1rem it means 16*1=16 or we write 2rem, it means 16*2=32px. For 100 rem 16*100. Now if the browser default font-size 30px. Then 5rem =30*5=150px |
vw | Viewport width |
vh | Viewport height |
vmin | Viewport minimum |
vmax | Viewport maximum |