Answers for "how to make buttons side by side html"

2

css buttons side by side

/* HTML
   <div class="button-container">
   <div class="button1">
   BUTTON1
   </div>
   <div class="button2">
   BUTTON2
   </div>
</div>
*/

.button-container{
  border: 1px solid pink;
  height: 100px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
  padding: 4px 4px 4px 4px;
}
.button1{
  border: 1px solid blue;
  height: 80px;
  width: 40%;
  background-color: blue;
   text-align: center;
  font-size: 20px;
  color: white;
  line-height: 80px;
  font-weight: 600;
  }
  
  .button2{
  border: 1px solid red;
  height: 80px;
  width: 40%;
  text-align: center;
  font-size: 20px;
  color: white;
  line-height: 80px;
  font-weight: 600;
  background-color: red;
  }
Posted by: Guest on July-22-2021
0

how to make buttons side by side html

.buttons {
  width: 50px;
  margin: 0 auto;
}

.action_btn {
  display: inline-block;
  width: calc(50% - 4px);
  margin: 0 auto;
}
Posted by: Guest on September-22-2021

Code answers related to "how to make buttons side by side html"

Browse Popular Code Answers by Language