How to align buttons to left and right of page


If I use the code below it puts the buttons to the left and right but they are on different rows.
Anyway to do this or do I need to use an ion-grid?

<ion-buttons start>
  <button ion-button outline color="primary">Close</button>
<ion-buttons end>
  <button ion-button outline color="primary">Back</button>
  <button ion-button outline color="secondary">Save</button>


Look at using the ion-grid to provide the positioning you are looking for. Also ion-buttons should only be used in the ion-toolbar component and not in ion-content.


I tried using ion-grid but could not get that to work as required. I will have another shot.
Its actually in the ion-footer now I’m assuming that is ok for ion-buttons.


try this:

  <button ion-button outline item-start color="primary">Close</button>

  <button ion-button outline item-end color="primary">Back</button>
  <button ion-button outline item-end color="secondary">Save</button>

You can use item-end and item-start to set the alignment. Note that it only works if your component with item-start/end is inside a ion-item.


I actually tried something similar earlier. While this does work for some reason it makes the buttons small and has an underline.
I can probably resolve this fairly easily though. I think I know how to get rid of the item underline I will have a play.