CSS__basicz
CSS__basicz
Basic Syntax
selector {
property: value;
}
h1 { .container p{
color: blue; color: red;
font-size: 36px; }
text-align: center;
}
CSS Box Model
• Content: The actual content inside the element.
• Padding: Space between the content and the border.
• Border: The boundary around the content and
padding.
• Margin: Space outside the border.
Positioning Elements
• Static Positioning
• Relative Positioning
• Absolute Positioning
• Fixed Positioning
• Sticky Positioning
Flexbox
• flex-direction: Defines the direction of flex items (row,
column, etc.).
• flex-wrap: Specifies whether flex items should wrap
onto multiple lines.
• justify-content: Aligns items along the main axis
(horizontal by default).
• align-items: Aligns items along the cross axis (vertical
by default).