CSS Exercise 6: Display and Positioning

We’ve been learning about boxes but I can’t see any code relating to them in both the html and css files, why? in Exercise 6 . Lesson: Display and Positioning

1 Like

At the start of the course is a page that explains the box model that CSS follows. It relates to block level elements, that is any element with width, height and position properties, as well as margin, padding, border, top, left, bottom and right properties, among others.

The box model concerns itself with dimensions, normal flow and position. The boxes as such are containers such as <div>, <ul>, <table>, <p>, etc., all of which are blocks.

In CSS we have a property called, box-sizing which lets us specifiy whether the border and padding is in the content box or surrounding it. It’s probably the only property with the word box in it.

1 Like

Thank you mtf! you made my day!

1 Like