Answers for "how to align a button to the right in css"

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
-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

Code answers related to "how to align a button to the right in css"

Browse Popular Code Answers by Language