Padding creates space between an element's border and content, while margin creates space between elements.
Display properties determine how an element is displayed. Inline elements take up only the space they need, block elements take the full width, and inline-block allows setting margins and padding on inline elements. None and hidden remove elements from the document flow in different ways.
Units in CSS include percentages, ems, and rems. Percentages define size relative to a parent, ems relative to font size of parent, and rems relative to the root element's font size.
Position properties are static (default), relative to itself, absolute to the closest positioned ancestor, and fixed relative to the viewport. Flex
Padding creates space between an element's border and content, while margin creates space between elements.
Display properties determine how an element is displayed. Inline elements take up only the space they need, block elements take the full width, and inline-block allows setting margins and padding on inline elements. None and hidden remove elements from the document flow in different ways.
Units in CSS include percentages, ems, and rems. Percentages define size relative to a parent, ems relative to font size of parent, and rems relative to the root element's font size.
Position properties are static (default), relative to itself, absolute to the closest positioned ancestor, and fixed relative to the viewport. Flex
Padding creates space between an element's border and content, while margin creates space between elements.
Display properties determine how an element is displayed. Inline elements take up only the space they need, block elements take the full width, and inline-block allows setting margins and padding on inline elements. None and hidden remove elements from the document flow in different ways.
Units in CSS include percentages, ems, and rems. Percentages define size relative to a parent, ems relative to font size of parent, and rems relative to the root element's font size.
Position properties are static (default), relative to itself, absolute to the closest positioned ancestor, and fixed relative to the viewport. Flex
Padding creates space between an element's border and content, while margin creates space between elements.
Display properties determine how an element is displayed. Inline elements take up only the space they need, block elements take the full width, and inline-block allows setting margins and padding on inline elements. None and hidden remove elements from the document flow in different ways.
Units in CSS include percentages, ems, and rems. Percentages define size relative to a parent, ems relative to font size of parent, and rems relative to the root element's font size.
Position properties are static (default), relative to itself, absolute to the closest positioned ancestor, and fixed relative to the viewport. Flex
Block : Takes Full Space Available in Width Inline-Block : Similar to Inline but can set Margin & Padding none : to remove the element from document flow Visibility : hidden (when set to none space is reserved but for display set to none)
Units in Css:
Relative (different): % , em , rem
% : define size as relative to an elements parent object
Em : 1 em relative to font size of parent Rem : font size to root element
Relative : element is relative to itself (top,right,bottom ,left,z-index will work) Absolute : position relative to its closet postion ancestor(remove from flow) Fixed :