Answers for "how to put things in center html"

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
0

how to assign something in center inside a div

IMG.displayed {
    display: block;
    margin-left: auto;
    margin-right: auto }
...
<IMG class="displayed" src="..." alt="...">
Posted by: Guest on October-20-2020

Code answers related to "how to put things in center html"

Browse Popular Code Answers by Language