@elaineleung
Posted
Hi Paschal, since Lucas gave you some excellent advice already, I'll follow him with some comments on the use of section
:
Right now, you have a section
within another section
. Nesting sections is not exactly considered good practice, as sections should typically be at the same level with one another. Also, when using
section`, it should contain a heading. If it doesn't have a heading, then perhaps it should be just a regular div. I suggest changing your HTML structure to something like this:
<main>
<div class="card-container">
<div class="image"></div>
<div class="text"></div>
</div>
</main>
// you can also try <article> for <div class="card-container">
I also suggest that your CSS can be structured in a cleaner way as it's a bit hard to read right now, and lastly, I'd reduce the margins within the elements in the text container, as right now it's creating a lot of unnecessary space. Instead having margins all around those elements, try only either top or bottom margin only.
Great work on the whole π