Design comparison
Solution retrospective
Although it is not very difficult, I still have some problems with centering, so much so that I used sections to complete the challenge, because with div I just crashed.
If you can give me some tips on easier methods to apply centering to a div, I would be very happy. Thank you all. ^-^
Community feedback
- @ashiqfuryPosted about 3 years ago
Great work.
- You can center anything with this two lines of code :
body { display: grid; place-items: center; }
0 - @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Layout in general looks really good.
Some suggestions would be:
- Using two
section
doesn't really help the structuring on this one, since the card is only a single component. For example, if a user navigated on themain
tag, maybe a user will be confused on why there are twosection
element that is direct child of it, an initial though would be that there are 2 section of themain
that have content, which on this case, it doesn't. If you will use these 2section
then make the cardarticle
then place the 2section
inside it. This way, it will be more clearer to the user since thesection
are from thearticle
. - The
alt
for the wavy background in the card should have been left empty likealt=""
. If an image that you are using acts as a decoration, then usealt=""
on it, if the image adds content, then use descriptivealt
value. - The person
img
should only usealt="Viktor Crest"
as the value, lose the word "image", avoid using words that relates to "graphic" like "image, icon, logo...", assistive tech will handle those for you. No need to describe an image to be an image, it is already an image :> - The bold numbers below shouldn't be a heading tag, because making it a heading tag doesn't really add any meaning at all right, like why would you make a number a heading of something. Some design files have bold text or element, but it doesn't mean that they should be heading.
- Also, those 3 at the bottom, you could have used
ul
on it, since those are "list" of information about the person.
Aside from those, great work on this again.
0 - Using two
- @satyamchaudharydevPosted about 3 years ago
Hey, centering any element is not that hard. For center :- use display flex to the parent of element that you want to center and parent must have width and height.
.your_parent_element{ display: flex; justify-content: center; //horizontally center align-items: center; //vertically center }
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