Exercise _3_profile card component with much love <3
Design comparison
Solution retrospective
Hi guys, I managed to do this challenge but had a bit of trouble setting up the two background svg images. I initially tried to set the background with css but with poor results, I still left the commented code inside if you want to have a look so you can explain to me where I am going wrong.
I need advice to learn how to make my code more responsive. I think this is becoming more and more important. For this reason I need all your advice!
I also accept advice on position: relative;
or position: absolute;
Thank you all, I love you <3
Community feedback
- @mauger1998Posted about 2 years ago
Hey man, Im gunna do my best to answer some of your questions but your going to have to clear up a few things as I am a bit unsure what you are asking... first I will talk about the background images... Ive had a little browse over your code and from what I remember I didnt use "position" atall when I did this challenege, tbh tho the svgs arent my strong point so thats the most I can tell you on that, I can definately give you advice on responsiveness and the benefits of absolute and relative so... first on responsiveness, try using media queries along with things like calc() and clamp() and minmax() when sizing things, I wont explain what these do here but you can look into that for yourself, I always use measurements for height and width in vw and vh for responsivenss as this means your items resize with the view port, lastly I would like to let you know that after looking at your code what I can tell you about position absolute and position relative is that you are using them way toooo much, not everything needs its "position" defined, you should only really be using these properties for either things that go against the natural flow of your page or when you need to z-index something as z-index only works when position is defined. Most projects I dont definine position on anything unless I need something bought to the front or like I said I want to z-index it. Realtive means the item is positioned based on its relative so keep that in mind. What I would reccomend as this is how I learnt to be good with backgrounds is on VSCODE type in background: and look at the emmet drop down menu that appears reccomending all the background properties, then just go through them and play around so you can understand what they do. Also rather than putting the background images in seperate containers and positioning those, try just adding them as the background image for the body, much easier imo, also just go look at other peoples code and see how they did it. Sorry this is a lot to read, but hopefully somewhere in this jumbled mess of a message you can find some value :)
Marked as helpful0@fedementrePosted about 2 years ago@mauger1998 Thank you so much, you have been very kind! This comment is full of valuable information and is very useful for me to improve. When I was writing the code I had the impression that I was overdoing it with position relative and absolute and indeed I was. I will do my best to try and put your advice on background and position into practice, and I will find out how best to use media queries with calc, clamp and minmax. Thank you very much again!
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