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
Your session has expired please log in again.
Your session has expired please log in again.
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive perfume blog with HTML and CSS

Deeem 40

@Deem1203

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Which is the best way (without using display: flex) to center the container and its contents

Community feedback

@Fasunle

Posted

Hi @Deem,

It is my pleasure to review your project. This is good for a starter and you can always become better. I will give a few tips that will help you do a better job.

  • Use can use either grid or flex. However, using flex is more flexible for this simple case. Using float or table is not recommended as this is very painful to scale in real life. That is not to say that they do not have their uses as well.

  • You can use picture tag to manage the two images without worrying about anything. Check this page to learn how to use it: https://www.w3schools.com/htmL/html_images_picture.asp

  • Read about semantic html. This will enable you to know which tag to use under different contexts and also, how they should be arranged/organized. Check: https://www.w3schools.com/htmL/html_images_picture.asp

  • On mobile screen size, ensure that your content does not take too much height. This prevents the image from getting too small (vertically). You can correct it by setting max-height for the content.

If you find this useful, kindly mark it as helpful.

Happy coding!!!

0
Vicktor 900

@Victor-Nyagudi

Posted

Hi, Deeem.

You can also use display: grid, however, I'm curious why you don't want to use flexbox.

Is it giving you issues?

Before grid and flexbox, front-end developers relied on float and clear to position items inside a container. It wasn't always the best, but it got the job done.

Read more about float and clear here.

Hope this helps.

0

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