@devsotter
Posted
Hi, did you have trouble centering things in the div? It's actually quite easy. Here's what you need to do: in order for your component to be centered, it needs to be within its parent class, which in your case is the ' .background' class inside the 'section'. So far, so good. However, using only the 'display: flex;' properties won't center it because the parent class needs to have the screen dimensions. Add the properties 'height: 100vh;' and 'width: 100%;', and then the content will be centered. After doing that, remove the 'padding-top: 6rem;' that you used in the 'section' to space the content from the top. And voila, everything will be centered.
Marked as helpful
@viniciuscalefo
Posted
@devsotter thank you very much for your help and tips, as I am still at the beginning these small tips that more experienced people bring are very good, thank you very much