Answers for "css button right side"

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
2

how to right align a text button

.flex-box {
  display:flex;
  justify-content:space-between; //button with flex box
  outline: 2px dashed blue;
}

.flex-box-2 {
  display:flex;
  justify-content: flex-end;
  outline: 2px deeppink dashed;
}
Posted by: Guest on May-04-2020
0

how to align form buttons right

style="float: right;"
Posted by: Guest on September-18-2020
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
-1

how to right align a text button

<h1>Button with Text</h1>
<div class="flex-box">
<p>Once upon a time in a ...</p>
<button>Read More...</button>
</div>

<h1>Only Button</h1>         //button with flex box
<div class="flex-box-2">
  <button>The Button</button>
</div>

<h1>Multiple Buttons</h1>
<div class="flex-box-2">
  <button>Button 1</button>
  <button>Button 2</button>
</div>
Posted by: Guest on May-04-2020

Browse Popular Code Answers by Language