How do you center a div?
3 simple ways to center a div (or any element) using CSS Let’s talk about a CSS skill that you will need time and time again: centering an element. At some point, you will need to center a div, a button, an image, a paragraph…the list is endless. So here are a few beginner-friendly ways …