Design comparison
Community feedback
- @denieldenPosted over 2 years ago
Hi Achuyat, I took some time to look at your solution and you did a great job!
Also I have some tips for improving your code:
- add
main
tag and wrap the card for Accessibility - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of image - to make it look as close to the design as possible add to
creator
class:
display: flex; align-items: center; gap: 1rem;
and move the avatar image out of the paragraph like this:
<div class="creator"> <img class="profile" src="Images/image-avatar.png" alt="image-avatar"> <p class="name"> Creation of <span>Jules Wyvern</span></p> </div>
- remove all
margin
fromcard
class - try to use flexbox to the body for center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - You can add the effect
:hover
creating adiv
that appears on hover. I used tailwind but you can still see and understand which css properties you can use to do the same. Look here -> my solution - try to add a little
transition
on the element with hover effect - instead of using
px
try to use relative units of measurement -> read here
Overall you did well 😉
Hope this help and happy coding!
Marked as helpful1@Achuyat-JoyPosted over 2 years agoHi Deniel, I've tried to change my code accordingly. Thank you. Can you give me a solution to change the picture hovering with another of course with transparent background. I couldn't understand how to implement it. It would be best if you can show me just how to change a picture with another with transparent background hovering the pic so that I can understand. It would be a pleasure if you can help me. @denielden
1@denieldenPosted over 2 years ago@Achuyat-Joy You are welcome! Ok, but did you look at how I did in my solution? Can't figure out how to replicate the same thing?
0@Achuyat-JoyPosted over 2 years agotailwind would be too much at this stage for me. was looking for simple solutions. @denielden
1@denieldenPosted over 2 years ago@Achuyat-Joy sure, I'm not saying that you have to use tailwind but try through the developer console to read the css properties I used and to replicate them in your css by creating a class.
This will help you hit your head and figure out how to do it. Even if you fail, I will help you in another way :) keep it up
0 - add
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