CSS Overview With Examples
CSS Overview With Examples
1. Selectors:
Selectors are used to select the HTML elements you want to style.
Example:
Example:
3. Box Model:
All HTML elements can be considered as boxes. The box model consists of: margin, border, padding, and
Example:
```
div {
width: 300px;
padding: 20px;
margin: 10px;
}
```
4. Positioning:
CSS gives you control over the layout of your elements using different positioning properties.
Example:
5. Flexbox:
Example:
```
.container {
display: flex;
justify-content: space-between;
align-items: center;
```