Submitted almost 2 years ago
Vanila HTML CSS profile card component
@kristiansnts
Design comparison
SolutionDesign
Solution retrospective
please check my code, i need some advice for next enhancment.
Community feedback
- @Mr-jawPosted almost 2 years ago
Hello there 👋
Congratulation on completing the challenge
HTML 📄
-
replace
<div class="profile-card">
with<main>
tag, And<div class="attribution">
with<footer>
to fix accessibility issues. -
Always provide
<img>
tag with meaningful and humnaly readable text about what the image is about inalt
attribute
CSS 🎨
- Use relative units like
rem
orem
for margin, padding, width, and height. most preferablyrem
for font size. avoid usingpx
since it is an absolute unit.
-To exactyl center the card component to the center of the screen. make these following chnages.
- From
.profile-card
removemargin: 15vh auto;
- Add these following lines of code to
body
element
body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; }
I hope this was helpful 😊
HAPPY CODING
Marked as helpful0@kristiansntsPosted almost 2 years ago@Mr-jaw thank you for the advice, it's very 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