Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive landing page using css flexbox

@FilipSzkarlat

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I feel quite confident with the code I wrote, but I suspect that I could have written something better or in a different way, if you find something like that, please comment :)

Community feedback

P

@XenoMee

Posted

Hello Filip! Your solution looks great and like the design. Great job 👏

I might have a few suggestions for you to improve it:

  • You can set a 100svh size for the body's min-height property instead of main.
  • Try to avoid using id selectors for styling as it raises specificity. Use classes as much as you can, even if you use them one time. This makes everything stay at the same level.
  • It's not ideal to set a width on texts (your h1 and p) since it affects the responsiveness of the website.
  • I personally would use a container for all your content inside main, then one more for the intro text and one more for all the cards. This makes your website be more component based and structured.
  • For the images inside each card, you can use the ::after pseudo-element since their purpose is to be decorative and does not present any context or meaning for the people who use screen readers.
  • You can use grid for the desktop layout since grid is often used for layout purposes while flexbox is used more for individual components.

Hope this information helped you 😊

Happy coding!

Marked as helpful

0

@FilipSzkarlat

Posted

Hello Adrian!

Thanks for the comment, I learned a lot of new things 😊. Could you explain a little more how I can use ::after in my case?

1
P

@XenoMee

Posted

Gladly!

So, when you select each individual card with your id selectors, for example:

  • #supervisor { border-top: 4px solid hsl(180, 62%, 55%); }

You can use the ::after pseudo-element like this:

#supervisor::after{
content="";
display: block;
background-image:url("/images/supervisor.svg")
width: (the svg's width)
height: (the svg's height)
}

Marked as helpful

0

@FilipSzkarlat

Posted

Great!

Thanks a lot, I followed your advices and improved the code, apart from using grid for the layout, I will use this advice in my next projects ;)

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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