Ionic add empty space between elements

15,048

Solution 1

You can use ion-row where h is whatever height you want. Make sure you add unit at the end of h (px, vw, vh, rem, etc.)

<ion-row style="height: h"></ion-row>

Solution 2

You can add &nbsp; between the two buttons.

Share:
15,048

Related videos on Youtube

krv
Author by

krv

Updated on June 04, 2022

Comments

  • krv
    krv almost 2 years

    I was wondering how to add space between two stacked buttons in ionic.

    I have two buttons and I want space between them and not between anything else that I might have on the page.

    What I want is a placeholder div like component that I can just drop which does this for me.

    What I am not looking for is to add gird or to change the CSS.

    In short I am looking for a quick and dirty way to add some space.

    • Duannx
      Duannx over 6 years
      Please clarify your question with code and image
  • Mitesh Shah
    Mitesh Shah about 5 years
    &nbsp with semicolon. &nbsp;