Sampath
Sampath

Reputation: 65870

Reduce the gap between cards - Ionic2

Can you tell me how to reduce the gap between cards? I have tried with margin-bottom but it is not working.

Plunker : Ionic2 Plunk

Note: Please see the home.html

I would like it as:

enter image description here

.sass

page-event-schedule {
   .gray {
        background-color: #f5f5f0;
    }
    ion-card {
        margin-top: 5px;
        margin-bottom: 5px;
    }
    ion-label {
        margin: 0;
    }
}

Upvotes: 2

Views: 1050

Answers (1)

sebaferreras
sebaferreras

Reputation: 44659

You can find the updated plnker here. I just deleted the margin-top:-25px; style rule hardcoded in the html of each ion-item, and added

ion-card {
  margin-top: 5px;
  margin-bottom: 5px;
}

ion-label {
  margin: 0;
}

Upvotes: 2

Related Questions