Useful site to check
Open Peeps:
Hand-drawn illustration library for free use.
→ openpeeps.com
#techtip
@javascript_resources
Open Peeps:
Hand-drawn illustration library for free use.
→ openpeeps.com
#techtip
@javascript_resources
Understand possible values for CSS transform property with this cheat sheet 🚀
👍1
CSS Margin and Padding🔥🤓
💠Margin
Margin is used for controlling spacing around elements in a web page.
This creates space between an element’s border and its neighbouring elements.
Margin is used for controlling spacing around elements in a web page.
This creates space between an element’s border and its neighbouring elements.
💠Margin Properties
▪️margin-top: sets the margin on the top side.
▪️margin-bottom: sets the margin on the bottom side.
▪️margin-left: sets the margin on the left side.
▪️margin-right: sets the margin on the right side.
▪️margin: sets the margin for all four sides.
▪️margin-top: sets the margin on the top side.
▪️margin-bottom: sets the margin on the bottom side.
▪️margin-left: sets the margin on the left side.
▪️margin-right: sets the margin on the right side.
▪️margin: sets the margin for all four sides.
💠Margin Values
▪️auto - the browser calculates the margin
▪️length - specifies a margin in px, pt, cm, etc.
▪️% - specifies a margin in % of the width of the container
▪️inherit - makes the margin inherit from the parent element.
⚡️Negative values are allowed.
▪️auto - the browser calculates the margin
▪️length - specifies a margin in px, pt, cm, etc.
▪️% - specifies a margin in % of the width of the container
▪️inherit - makes the margin inherit from the parent element.
⚡️Negative values are allowed.
💠Margin Shorthand Property
You can use the margin shorthand property to set all four margin values at once.
You can use the margin shorthand property to set all four margin values at once.
💠Padding
Padding is used to create space between an element’s content and its border.
It affects the space inside the element.
Padding is used to create space between an element’s content and its border.
It affects the space inside the element.
💠Padding Properties
▪️padding-top: sets the padding on the top side.
▪️padding-bottom: sets the padding on the bottom side.
▪️padding-left: sets the padding on the left side.
▪️padding-right: sets the padding on the right side.
▪️padding: sets the padding for all four sides.
▪️padding-top: sets the padding on the top side.
▪️padding-bottom: sets the padding on the bottom side.
▪️padding-left: sets the padding on the left side.
▪️padding-right: sets the padding on the right side.
▪️padding: sets the padding for all four sides.
💠Padding Values
▪️length - specifies padding in px, pt, cm, etc.
▪️% - specifies padding in % of the width of the container
▪️inherit - makes the padding inherit from the parent element
▪️length - specifies padding in px, pt, cm, etc.
▪️% - specifies padding in % of the width of the container
▪️inherit - makes the padding inherit from the parent element
💠Padding Shorthand Property
You can use the padding shorthand property to set all four padding values at once.
You can use the padding shorthand property to set all four padding values at once.