Coding task · HTML and CSS course · Module 3: CSS Basics
Gallery with display inline-block
Imagine a row of statues in an Egyptian temple. Inline elements sit next to each other, but you cannot control their size. Block elements take up the entire row. Use display: inline-block to combine both features - elements will sit side by side with width and height control!
Task
Create 4 <div> elements with class .statue. In CSS, set .statue { display: inline-block; width: 100px; height: 150px; margin: 10px; background-color: #D4A574; text-align: center; }. Add a second row with block elements (display: block) and compare the differences.