Lecture
Setting the Direction of Margins
Margins and padding allow you to add space in specific directions: top, bottom, left, and right.
Top, bottom, left, and right refer to the margin or padding space at the top, bottom, left, and right parts of a page, respectively.
Applying CSS Properties to the box Class
.box { margin-top: 10px; /* Adds 10px of space to the top */ padding-bottom: 20px; /* Adds 20px of space to the bottom */ margin-left: 10%; /* Adds left margin equal to 10% of the element's width where the box class is applied */ }
Lessons in this chapter · Creating a Hero Section
- 1. Adding Space to Elements
- 2. Setting Margin Orientation
- 3. Defining Margin and Padding with CSS
- 4. Automatically Calculating Margin
- 5. HTML a Tag
- 6. a Tag target Attribute
- 7. SVG Tag
- 8. Decorating Links
- 9. Flex Layout 1
- 10. Flex Layout 2
- 11. Applying Flex Layout
- 12. Creating a Self-Introduction Section Using Flex
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help