Panjiβ’ 2,110
@pperdana
Posted
Hi, Well done on completing the challenge! π
- I have more suggestions regarding your code that I believe will be highly beneficial for you.
π Center an element both horizontally and vertically
Using flexbox:
Set the display property of the parent element to "flex" and use the "justify-content" and "align-items" properties to center the child element both horizontally and vertically. For example:
.parent {
display: flex;
justify-content: center;
align-items: center;
}
.child {
/* other styles for the child element */
}
I hope this information was beneficial for you! π
Happy codingπ€
Marked as helpful
1
AMKβ’ 140
@ahmed322
Posted
@Panji200
Thank you that's really helpful
0