Form Position Getting Changed | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 18

Form Position Getting Changed

1. Click on Next button. 2. Click on Previous button. The position of the form is being changed on this previous button click. Now If I remove justify-content: center, it works normally and perfectly but now if I remove this property from body then I cannot align the form vertically centered, even by any other method. If I try to align it vertically center, then the form position changes. What can I do to solve this ?? I have attached the code for reference below: https://code.sololearn.com/Wzc9dX8VpJ3V/?ref=app

16th Jun 2020, 4:47 PM
Nova
Nova - avatar
2 Answers
+ 12
moses If I try to align it vertically center, then the position of form is getting changed on Previous Button click. Then how can I fix it ? And another thing, till I know align-self and justify-self properties are used for aligning in grids and not in flexbox 😅
17th Jun 2020, 2:56 AM
Nova
Nova - avatar
+ 3
In the css try use: display: flex; flex-direction: column; align-self: center; justify-self: center;
16th Jun 2020, 8:04 PM
moses
moses - avatar