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

Qr-component

@mariamkilany

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Luigiβ€’ 240

@luigi-perone

Posted

Hi Mariam,

You've a great solution here but there are some tags you can consider changing in the html, for example, the div with bold class should be wrapped with an h1, you can also replace the first div with an main tag. After that img tag must have alternate text GET EXPLAINED HERE so u should update

<img src="images/image-qr-code.png">

to

<img src="images/image-qr-code.png" alt="qr-code-image">

Hope it helps, happy coding πŸ‘‹

0
Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHello Mariam Ayman, congratulations for your new solution!

Fix the image and the container responsiveness by adding max-width in place of width for the container and for the image add display: block and max-width: 100% to make the image follow the container size:

.con {
    max-width: 215px;
    height: 350px;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: hsl(0, 0%, 100%);
    border-radius: 15px;
}

img {
    display: block;
    max-width: 100%;
    border-radius: inherit;
}

Note that there's no need to use height here, because since you set a height for an element, this means that this element will grow until a certain point and after that the inner content (as texts or images) will start to pop out the element due its fixed height, so isn't necessary to set the height the container height comes from the elements, its paddings and height.

πŸ‘‹ I hope this helps you and happy coding!

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