Box Model CSS
Let’s see the Box Model implementation in HTML and CSS.
Box Model
1 2 3 4 5 6 7 |
.box { background-color: pink; width: 400px; border: 30px solid red; padding: 30px; margin: 30px; } |
Width and Height of an Element
1 2 3 4 5 6 |
img { border: 10px solid purple; width: 300px; height: 100px; } |