Type of Unit to in CSS | Master CSS
CSS units are used to specify the size and positioning of elements on a web page. There are various units available, and among them, three common types are absolute units, relative units, and percentage units.
Absolute Units:
Absolute units are fixed and do not depend on the context of the element or the screen size. They provide a precise measurement in a specific unit.
a. Pixels (px):
Pixels are the most common absolute unit. They provide a fixed size and are not affected by the user's screen resolution. For example, setting an element's width to 200px means it will always be 200 pixels wide, regardless of the device's screen size.
b. Inches (in), Centimeters (cm), and Millimeters (mm):
These units allow you to specify sizes in physical measurements. For example, setting an element's width to 2in means it will be 2 inches wide on a printed page or when displayed on a screen.
Relative Units:
Relative units are based on the size of other elements or the current viewport, making them more adaptable to different screen sizes and resolutions.
a. em:
The "em" unit is based on the font size of the element. For example, if you set the font size of a parent element to 16px and an inner element to 2em, it will be 32px (2 times the parent's font size).
b. Rem (Root em):
Similar to the "em" unit, it is relative to the root element's font size, making it more predictable and easier to control for the overall layout.
c. Percent (%):
Percentage units are used to specify a size relative to the parent element's size. For example, setting an element's width to 50% means it will be half the width of its parent container.
Percentage Units:
Percentage units are a type of relative unit, and they are commonly used for responsive web design.
a. % (Percent):
As mentioned above, percentage units are used to specify a size relative to the parent element's size. For example, setting the width of an element to 50% means it will take up 50% of its parent container's width.
When creating a video or tutorial about CSS units, it's essential to explain how these units work, provide examples of their usage, and demonstrate their impact on responsive web design. This will help your audience understand when to use each type of unit and how to create flexible and visually appealing web layouts.
================
Nextjs Github Repo:
https://github.com/mentorvikash/react-mui-youtube
===============
DISCLAIMER: I am not an expert but a learner. I appreciate you support and love you give me by watching my videos.
130 Friends on 14/01/23
185 Friends on 15/04/23
200 Friends on 13/05/23
500 Friends (in progress...)
Видео Type of Unit to in CSS | Master CSS канала Mentor Vikash
Absolute Units:
Absolute units are fixed and do not depend on the context of the element or the screen size. They provide a precise measurement in a specific unit.
a. Pixels (px):
Pixels are the most common absolute unit. They provide a fixed size and are not affected by the user's screen resolution. For example, setting an element's width to 200px means it will always be 200 pixels wide, regardless of the device's screen size.
b. Inches (in), Centimeters (cm), and Millimeters (mm):
These units allow you to specify sizes in physical measurements. For example, setting an element's width to 2in means it will be 2 inches wide on a printed page or when displayed on a screen.
Relative Units:
Relative units are based on the size of other elements or the current viewport, making them more adaptable to different screen sizes and resolutions.
a. em:
The "em" unit is based on the font size of the element. For example, if you set the font size of a parent element to 16px and an inner element to 2em, it will be 32px (2 times the parent's font size).
b. Rem (Root em):
Similar to the "em" unit, it is relative to the root element's font size, making it more predictable and easier to control for the overall layout.
c. Percent (%):
Percentage units are used to specify a size relative to the parent element's size. For example, setting an element's width to 50% means it will be half the width of its parent container.
Percentage Units:
Percentage units are a type of relative unit, and they are commonly used for responsive web design.
a. % (Percent):
As mentioned above, percentage units are used to specify a size relative to the parent element's size. For example, setting the width of an element to 50% means it will take up 50% of its parent container's width.
When creating a video or tutorial about CSS units, it's essential to explain how these units work, provide examples of their usage, and demonstrate their impact on responsive web design. This will help your audience understand when to use each type of unit and how to create flexible and visually appealing web layouts.
================
Nextjs Github Repo:
https://github.com/mentorvikash/react-mui-youtube
===============
DISCLAIMER: I am not an expert but a learner. I appreciate you support and love you give me by watching my videos.
130 Friends on 14/01/23
185 Friends on 15/04/23
200 Friends on 13/05/23
500 Friends (in progress...)
Видео Type of Unit to in CSS | Master CSS канала Mentor Vikash
Комментарии отсутствуют
Информация о видео
27 октября 2023 г. 23:30:02
00:05:17
Другие видео канала