Answers for "how to center a div veritically and horizontally"

CSS
2

css center vertically and horizontally

body {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
/* to make "align-items: center" work: use "min-height: 100vh;"
100vh = 100% Viewport Height */
Posted by: Guest on May-04-2021

Code answers related to "how to center a div veritically and horizontally"

Browse Popular Code Answers by Language