Design comparison
Solution retrospective
Like my last I found making and doing the desktop version more difficult than the mobile version. Not sure how I can improve on that at all, I tried a lot and even looked at other solutions to give me an idea of what I'm supposed to do, it barely helped. I'm unsure about my media query if I'm being totally honest, the centering of the div is very off, not sure how I can fix that at all. My question is how can I just improve on the desktop design?
Community feedback
- @Rozan-APosted over 1 year ago
hello you can put the card in child div and give the parent { display:flex; justify-content:crnter; align-items:center;} good job
1 - @Thewatcher13Posted over 1 year ago
Good written html
A few things
- consider the use of an s tag on the old price
- use the picture element on the pictures
Css:
- don't use id is has a high specificity
- be consistent in the value of font size use rem not px , you have a few px..
Keep practice, and your gonna be more and more familiar with media queries. Mosy of the time on your media queries it is just change of directions or add margins or padding.
What do you find difficult?
For centering the whole project on the middle of the viewport, Use on the body element: Display: flex Justify-content:center Align-items: center
Or
Margin:0 auto
1@av1adPosted over 1 year agoThank you! I didn't know the s tag existed and also I think I did try to do the picture element but it didnt seem to work for some reason so I found the other method I used.
Should I only be using classes on 99% of my elements, which elements should be using IDs?
Thank you for the telling me to use the body element, I was using the container ID I made instead and was getting confused! @Thewatcher13
0@av1adPosted over 1 year agoIt doesn't seem like margin 0 auto or putting flexbox on the body works as intended, it should be the center of the page which I don't think it did that, is there something Im doing wrong? @Thewatcher13
0 - @Thewatcher13Posted over 1 year ago
I see on the design, that it works. Margin:0 auto;
Aligns the content only on the horizontal axis, not vertical.
Flex should be work?
0@av1adPosted over 1 year agoI also did flexbox. It doesn't seem to be at the exact middle of the screen, it is spaced correctly just not in the middle of the screen like the design @Thewatcher13
0@av1adPosted over 1 year agoIt just seems like it's more towards the top of the screen instead of the middle @jewelsonmyjeans
0@Thewatcher13Posted over 1 year agoCan you update your code with flex? So delete the marin 0 auto
0@Thewatcher13Posted over 1 year ago- You have delete your </body>..?
- add min-height:100vh; on the body
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