Design comparison
Solution retrospective
Hello,
could you please help with profile picture positioning and responsivity? I just could not keep it on place when resizing windows.
Also I could not set the background
Thank you in advance!
Community feedback
- @JaneMorozPosted almost 2 years ago
Hey! Your solution to this challenge is great! 💪
I looked at you code. So I'd advice to remove
position:absolute;
fromprofile-picture
andmargin-bottom: 4rem;
fromtop-background
and then just addtransform: translateY(-50%);
toprofile-picture
.Keep it up! And good luck 🍀
Marked as helpful1@Swing95Posted almost 2 years ago@JaneMoroz
Hello Jane,
thank you, that really worked :-)
Is it possible to do it so that image does not take space after moving? When I use position absolute, it does not work then.
I have fixed it by also using translateY(-40%); on my info class (name, age, location), because it took too big space and padding-margin were increasing my card size.
Thank you !
1@JaneMorozPosted almost 2 years ago@Swing95 Well, if you want to position image absolutely, I guess you can put
profile-picture
insidetop-background
and addposition: relative;
totop-background
(otherwise image'll be positioned relative tobody
). Then just usetop
,left
,transform:translate
to positionprofile-picture
properly.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