Issue
I am learning Ionic app. I got introduced to Grid thing, however, I am stuck at removing/modifying spaces between rows ( row number 2 and 3) as shown in the following screenshot:
I have following code in my HTML:
<ion-content padding>
<ion-row>
<ion-label> I am good I do not want any space.</ion-label>
</ion-row>
<ion-row>
<div >
<div class="inner">
<ion-label *ngIf="!inverse" no-margin>1 USD = 67 INR</ion-label>
<ion-label *ngIf="inverse" no-margin>1 INR = {{(1/67) | number }} USD </ion-label>
</div>
<button (click)="inverse=!inverse" ion-button clear class="iconWidth" color="dark"> <ion-icon name="swap" class="rotate"></ion-icon></button>
</div>
</ion-row>
<ion-row>
<p>Can you help me to get rid of space between this row and above</p>
<ion-label> Thanks</ion-label>
</ion-row>
</ion-content>
SCSS:
page-home {
.rotate {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
margin-bottom: 15px;
}
.inner{
display: inline-block;
width:70%;
}
.iconWidth{
width:20%;
}
}
How can I customize the gap between row 2 and row 3?
Solution
Use negative margin-top
html
<ion-row class="bottomRow">
<p>Can you help me to get rid of space between this row and above</p>
scss
.bottomRow
{
margin-top: -20px;
}
Answered By – David
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0