Answers for "flex box centered item and an item to the left"

1

how to center an item without flex

.container{
position: relative;
}
.child{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 50%);
}
Posted by: Guest on September-06-2021
0

move text to center of page flexbox

// Assuming a horizontally centered row of items for the parent but it doesn't have to be
.parent {
  align-items: center;
  display: flex;
  justify-content: center;
}

.child {
  display: flex;
  align-items: center;
}
Posted by: Guest on April-15-2021

Code answers related to "flex box centered item and an item to the left"

Browse Popular Code Answers by Language