@NeilAndrewReyes. In CSS the perfect way you can center an element is set the display to flex , justify-content to center and also align-items to center. illustration:
display: flex;
justify-content: center;
align-items: center;
}
A typical example include.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Perfect Centering</h1>
<p>A flex container with both the justify-content and the align-items properties set to <em>center</em> will align the item(s) in the center (in both axis).</p>
<div class="flex-container">
<div></div>
</div>
</body>
</html>
I hope you find this helpful and mark it as helpful. Great work by the way you did good. Keep up the good work and you will be advanced in no time. Thank you. If you find this
Marked as helpful