Snipps by Patrik

How to align right

To align content like buttons to the right you can use CSS flexible box layout.

<div class='align-right'>
   <button>Cancel</button>
   <button type='submit'>Create</button>
</div>

The CSS to align the buttons on the right uses two properties.

.align-right {
  display: flex;
  justify-content: flex-end;
}

References

Comments