I would like to briefly share what I've learned
Flex Container
It's a CSS layout to arrange and align items in a container
To create a flexible container,set
display:flex
Example
Container{
display:flex;
}
This allows you to use flexbox properties to control the layout of child elements
Styling a List
Example
ul{
display:flex;
gap:10px;
flex-direction:row;
justify-content:center;
}
Explanation
gap:10px
- To add a gap between flex itemsflex-direction
property can be set to row or column to control the direction of flex itemsAdditionally,
align
andjustify
properties can be used to control alignment,but only whendisplay:flex
is set
Section Styling
section { border:1px solid }
- adds a 1px solid line around a sectionborder-width:10px
- sets the border thickness to 10pxborder-radius:10px
- curves the corners by 10px
Box Model
*{ margin:auto;}
- centers an element horizontally with equal outside spacepadding:10px
- adds 10px inside space around contentif no pixel is set,margin or padding applies to all four sides
Top comments (0)