Design comparison
Solution retrospective
it was quiet a good challenge for first timer's like me it is very good . I don't know what to do with that attribute in the given code so i commented in the code you can see it and tell me . it's rough coding can you suggest me how can i improve my code and making it clean code for others to read it and understand . i am open minded so any suggestions you are thinking of giving fell free to comment.
All feedback is welcome Thank you in advance.
Community feedback
- @maciejkrol18Posted about 2 years ago
The 'attribution', or 'attribute' as you referred to it, is something you'll find pre-written in the HTML file of every Frontend Mentor project. It's just a suggested way of signing your work, so to speak. You can delete / comment it out if you want.
As for your code, it's pretty readable, although i've got some suggestions for you to consider:
- Why not simplify that article tag on line 37 in your .html file? It's not really readable when everything's on the same line.
- Remove the default margin from your body tag (add
margin: 0
) and addmin-height: 100vh
to it. The vh unit means viewport height, so your body tag will take up the entire screen, which makes the card properly centered. - Some of your CSS variables are lowercase and other ones are camel case. You should make it consistent by picking one of the two. On the topic of variables, what is that
margin: 0
andpadding: 0
in the :root? - I'm not really sure about that
<ul>
tag used in the nft's price and days left. I would replace it with simple flex container.
That's all i could think of for now. Overall, good job on your first project!
Marked as helpful0 - @jgreen721Posted about 2 years ago
Nice job on the challenge!
Yea I find the attribution tag can sometimes be a nuisance/eye-sore to the rest of the design but it does allow a developer signature of some-sort if exercised...I usually give it a position of
absolute
andbottom:0
which should kick it to the bottom of the screen and then give it width of 100% andtext-align:center
so its just centered at the bottom and generally out of the way. Obviously there are other ways to achieve that but ya, bottom center I think is where you're aiming at. Don't think its a huge deal to just comment it out though either. 🙂Marked as helpful0 - @yanniro2Posted about 2 years ago
try this your container should be aligned in the center is the perfect one body { width: 100vw; height: 100vh; display:flex; align-items: center; justify-content: center; }
container{ min-width: 375px; min-height:400px; }
Marked as helpful0
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