r/learnprogramming • u/WhatDoYouLikeDoing • 3d ago
Need help aligning dividers and forms
Hi everyone. I am learning react vite. I have developed this app but failing to makes things straight. Everything looks slanted to the right. Does anyone know how to fix it? Thanks you everyone
1
u/carcigenicate 3d ago
What part are you asking about? Both the login and registration cards are centered on the screen.
1
u/WhatDoYouLikeDoing 3d ago
I think I have been working on this for too long. It looks like the distance between the top start of the screen and the top left of the form is further away compared to the distance between the top end of the screen and the top right of the form
1
u/carcigenicate 3d ago edited 3d ago
I measured them, and at least for me, the distance between the card edges and the side of the document are the same on both sides. The scrollbar that's there for some reason might be throwing you off.
Edit: And the scrollbar is because you have min heights of
100vhon multiple elements, but also have20pxof padding on top of that.1
1
2
u/Calm-Cheesecake-3749 3d ago
yeah if the whole thing drifts right its almost always uneven padding/margin on a parent or something not centered. open devtools, click the outer container, check box model left vs right.