how to fix alignment using flex box

hello I am trying to create a patient details modal. First Name and Last Name looks good but age, sex is not align with the first name and last name and phone email too but city and state is okay with first name and last name.
9 Replies
nehatkhan
nehatkhan•2y ago
unable to send the code so sharing screenshot of the code
Jochem
Jochem•2y ago
there's instructions on sharing code in #How To Ask Good Questions
nehatkhan
nehatkhan•2y ago
sir I tried to follow the rules but dont know where i amm wrong. I need helo with field alignments
Jochem
Jochem•2y ago
not necessarily a rule, just a helpful list of tips 🙂 people are more likely to help with code they can run, or at least read and/or copy paste.
nehatkhan
nehatkhan•2y ago
Sure sir will do that in a minute by dividing every parts
Jochem
Jochem•2y ago
to answer your question, flexbox isn't really made to fix alignments, by default it gives elements the space they want within the row they're in and different rows have no influence on each other. You can force them to align by setting widths on the elements, but that's potentially bad practice. it's probably easier to use grid in this case, because grids will align by columns and rows
nehatkhan
nehatkhan•2y ago
git it sir thanks a lot
nehatkhan
nehatkhan•2y ago
thanks a lot sir, manage to do it with the grid
Jochem
Jochem•2y ago
nice, glad you got it fixed!
Want results from more Discord servers?
Add your server