Lecture
Setting Margin Orientation
Margins and padding can be set to specific directions using top, bottom, left, and right properties.
Top, bottom, left, and right correspond to the margins at the top, bottom, left, and right parts of an element respectively.
Applying CSS properties to the 'box' class
.box { margin-top: 10px; /* 10px margin at the top */ padding-bottom: 20px; /* 20px padding at the bottom */ margin-left: 10%; /* Adds a left margin of 10% of the element's width for the elements with 'box' class */ }
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