Answers for "html center dicv"

CSS
2

centre div

<div class="container">
  <div class="child"></div>
</div>
.container {
  ...
  display: flex;
  justify-content: center;
  align-items: center;
}
Posted by: Guest on July-28-2021
0

center a div

.container{
	margin: 0 auto;
    display: flex;
    align-items: center;
}
Posted by: Guest on August-03-2021

Browse Popular Code Answers by Language