Answers for "div location center"

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
1

div center

#inner {
  display: table;
  margin: 0 auto;
  border: 1px solid black;
}

#outer {
  border: 1px solid red;
  width:100%
}
Posted by: Guest on December-07-2020

Browse Popular Code Answers by Language