I didn't know how else to change states so I set both sets to an absolute position and hide the 'Thank you' card. Is this the correct way to do something like this? The alternative seemed like a bunch of DOM manipulation which seemed impractical.
Reddsito
@ReddsitoAll comments
- @bennyheoSubmitted about 2 years ago@ReddsitoPosted about 2 years ago
Hello, I will not be the most experienced but, the way I make the change is simply that, when an option is already selected, when pressing the "submit" button add a class to the main box, for example "--active" and I make that when that box has that class, do display: none to all the div, except the one I want to show, I don't know if it's more practical but it's an option :D
1 - @sociablerobot10Submitted about 2 years ago
Hi all. I completed my first challenge. Had some trouble moving the card to the center. What are areas for improvement and how can I make it optimal or incorporate best practices?
@ReddsitoPosted about 2 years agoHello, I will not be the most experienced, but a tip to center a div in the middle of the screen is with flexbox, I would recommend that you see a tutorial on it, to summarize you place in the body = display: flex, justify-content: center, align-item: center, width: 100%, height: 100vh. and done :D
Marked as helpful0 - @Kafka22Submitted over 2 years ago
Hello! how are you! I am delighted to have finished my first frontendmentor project! I didn't have many difficulties, except for some specificity, and position. But it seems to me that there are many lines of code. Could the code be more optimizable? In what way?
@ReddsitoPosted over 2 years agoI recommend that you do the style in a css document to have everything more organized, it is a bad practice to place the style in the html
Marked as helpful0