Answers for "how to center a html header"

CSS
1

header center

div {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: blue;
}

text {
  background: orange;
}

<div>
   <text>Centered horizontally and vertically</text>
</div>
Posted by: Guest on December-03-2020
1

how to center a html header

h1{text-align: center;}
Posted by: Guest on December-18-2020
1

align centre

.headerTwoDiv{
			margin:1% auto;
			margin-right: auto; margin-left: auto; width: 21%; 
			padding-top: 11px;
		}
Posted by: Guest on September-07-2020

Browse Popular Code Answers by Language