@Saad-Hisham
Posted
To center the parent div on the screen, you can apply the following CSS edits:
.contenedor__general {
width: 100%;
min-width: 315px;
margin: 0 auto;
background: var(--Grayishblue);
padding: 20px;
min-height: 100vh;
display: flex;
align-items: center; /* Center vertically */
justify-content: center; /* Center horizontally */
}
In the updated CSS:
The margin property is set to 0 auto to horizontally center the element by setting equal margins on the left and right sides.
The justify-content property is set to center to vertically center the content.
These adjustments will help center the parent div on the screen both horizontally and vertically. Great job keep it up happy coding ✨
Marked as helpful
@Galindezpro
Posted
@Saad-Hisham thanks, I help me for next challenger,