@AlexBueckig
Posted
Hi Vaibhav,
I saw you used position: absolute;
to position your cards. I'd recommend you to use the layout tools provided by CSS like flexbox or grid to position your elements instead of using position: absolute
. You can find good tutorials on how to use them here: https://www.frontendmentor.io/resources
I'd pick flexbox to start off with and when you are pretty familiar with it I'd have a look into grid. Both of them combined will allow you to create all kinds of amazing layouts.
@Vaibhav-chandak
Posted
@mattstuddert yeah, i started learning grids now.
@Vaibhav-chandak
Posted
Thank you for the suggestion. I will checkout the course.
@Vaibhav-chandak
Posted
@AlexBueckig can you tell me some benefits or uses of using flexbox or grid instead of position:absolute. I am new in web development and just started learning. I don't know about flexbox or grid.
@mattstuddert
Posted
@Vaibhav121121 Hey Vaibhav! Just to follow up on this, using position: absolute
means you're essentially sticking elements to the page, meaning they get removed from the natural flow of the elements around them. This means you can get into much more difficulty with your layout.
As Alex mentioned, I'd definitely take a look into Flexbox and Grid to learn more reliable ways of laying out your elements 👍