Design comparison
Community feedback
- @dineshjrPosted over 1 year ago
Hi kirubavathi vm i have reviewed your code this is a small component based challenge so as per my suggestion kindly don't use bootstrap for this try with pure html and css and make your parent div inside the flex box and arrange it properly then rectify the media query errors when am visiting your component with mobile view and on device it looks like scattered and unarranged and the ui is not so good at all .
That's all about my review so please feel free to contact me anytime.
Thanks & Regards Dinesh
Marked as helpful0 - @RabicaTahirPosted over 1 year ago
Asalam o Alaikum! @kirubavathi-VM. π―Congratulations on completing the challenge !
π¬I have some suggestions about your code.
HTML π:
βͺ It is advisable that you place all your main site content in a landmark element <main>. Wrap the body code in main tag. Click & Wrap the code
<div class="container">
βͺ Best practice is to ensure that the beginning of a page's main content starts with a h1 element. Replace this
<h5>Improve your font-end <br>skills by building projects</h5>
βͺ Instead of using the <br> tag , you should use a semantic HTML element and the CSS margin or padding properties.
CSS: π¨
πβͺ Instead of using pixels in font-size, using relative units like em or rem is a good practice.
πβͺ Check the style guide & change the background color.
I hope you find it useful! By the way, the solution was great. ππ―
Enjoy coding, Stay Safe! π€
Marked as helpful0 - @ecemgoPosted over 1 year ago
Some recommendations regarding your code that could be of interest to you.
HTML
- You'd better update the html structure in this way:
- You've deleted the image so you'd better add img which is
image-qr-code.png
<body> <div class="container"> <img src="images/image-qr-code.png" alt=""> <h5>Improve your font-end <br> skills by building projects</h5> <p>Scan the QR code to visit Frontend<br> Mentor and take your coding skills <br>to the next level</p> </div> </body>
CSS
- If you want to make the card centered both horizontally and vertically, you'd better add flexbox and
min-height: 100vh
to the body - For the color of the screen, you can use the recommended color in the body
body { /* background-color: aquamarine; */ background-color: hsl(212, 45%, 89%); display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; }
- If you use
max-width
, the card will be responsive - You'd better add
padding
to give a gap between the content and the border of the card - This is new
.container
which is old.c
.container { border-radius: 4%; /* border: 2px solid #fff; */ background-color: #fff; text-align: center; padding: 20px; max-width: 300px; }
- In addition to that above, in order to make the card responsive and the image positioned completely on the card, you'd better add
width: 100%
to the img
img { width: 100%; border-radius: 4%; /* width: 255px; */ /* height: 255px; */ /* margin-top: 25px; */ /* margin-bottom: 20px; */ }
- You don't need to use old
.container
and you can remove it
/* .container { padding-top: 90px; } */
- Finally, if you follow the steps above, the solution will be responsive.
Hope I am helpful. :)
0
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