Design comparison
Solution retrospective
I'm curious to know if anyone made this with Grid instead of Flexbox? I have an easier time making things work in Flex than I do Grid, so I'd love to know how others approached it!
Community feedback
- @adonmez04Posted over 1 year ago
Hi, @hannyfish. I prefer CSS Grid for the general page layout to readable code. I also know that flexbox is an easy option, but when I use
@media-queries
, flexbox will be hard to read and understand. I have some suggestions for you.The HTML Structure
-
You definitely don't need to use
span
tag instead ofdiv
.span
is an inline element. You shouldn't use it like adiv
. You should usesemantic elements
ordiv
tags for the grouping and styling of its child elements. You should correct this. That's why you got these errors in yourHTML validation report
. -
You can use
strong
instead ofb
for more semantic meanings of your code. -
You should use
h1
tag once on your web pages for the hierarchy. You can useh2-6
tags limitless. -
You also don't need
<h2>companies</h2>
. Keep it simple and use justp
tag for the text.
The CSS Structure
- Your design is not responsive. You don't need to give
height
andwidth
values to your elements. You can givemax-width
ormin-width
your wrapper or parent element. Then you can set the container's width and height values with child's contents and padding-margin values. That's why we use flexbox. Flexbox makes everything fluid easily. - Never worries. It's a good solution and you'll get step by step to perfect solution.
- For more readable code, you can use multiple lines instead of one line in your CSS file.
Check some good solutions and implement them into your code.
I hope these will help you to improve your perspective. Keep coding. All the best.
Marked as helpful0 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord