-1

I want the three buttons centered vertically all in the same row. I want all three button aligned like text "Select your attack:" is. please tell me how to align three object in same row.

.prompt_user_to_choose {
  margin: 0;
  display: flex;
  justify-content: center;
  min-height: 10vh;
  align-items: center;
  text-align: center;
  font-size: 25px;
}
.results {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 10vh;
  text-align: center;
  font-size: 25px;
}
.Rock {
  width: 70px;
  height: 70px;
  padding: 10px 16px;
  border-radius: 35px;
  font-size: 14px;
  text-align: center;
  font-weight: bold;
  background-color: rgb(255, 60, 60);
}

.Paper {
  width: 70px;
  height: 70px;
  padding: 10px 16px;
  border-radius: 35px;
  font-size: 14px;
  text-align: center;
  font-weight: bold;
  background-color: rgb(105, 255, 105);
}

.Scissors {
  width: 90px;
  height: 70px;
  padding: 10px 16px;
  border-radius: 35px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  background-color: rgb(36, 186, 255);
}

this is what I have enter image description here

this is what I want: enter image description here

1 Answers1

1

You can use un flex container for the three buttons and then

.container {
    display:flex;
    /* items are centered along the line */
    justify-content: center;
    /* center: items are centered in the cross-axis */
    align-items: center;
}
Dharman
  • 30,962
  • 25
  • 85
  • 135