Answers for "box with centered horizontal and vertical text html"

CSS
6

how to center a div vertically and horizontally

.container{	
	margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
  	width: /* Define the width here; */
    height: /* Define the height here; */
}

/*You have to define the width and height! */
Posted by: Guest on March-03-2020
0

center anything horizontally and vertically in CSS

.center {
  display: flex;
  align-items: center;
  justify-content: center;       
}
Posted by: Guest on April-26-2022

Code answers related to "box with centered horizontal and vertical text html"

Browse Popular Code Answers by Language