Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use text-wrap for ion-card in Ionic 2?

Tags:

ionic2

THE SITUATION:

I need to use the text-wrap for an ion-card but it seems it doesn't work.

THE CODE:

<ion-card>

    <ion-card-header text-wrap>

        <h2> <ion-icon name="list-box"></ion-icon> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labor</h2>

    </ion-card-header>

    <ion-card-content>

        <p>content</p>

    </ion-card-content>

</ion-card>

THE PLUNKER:

http://plnkr.co/edit/z5ehOQgz0oArhg6mMtUj?p=preview

THE QUESTION:

There is a way to use text-wrap for the ion-card?

like image 783
FrancescoMussi Avatar asked Dec 19 '16 11:12

FrancescoMussi


2 Answers

<ion-card-header text-wrap>

you can use text-wrap in other components too.

like image 137
Jorge Vieira Avatar answered Nov 19 '22 18:11

Jorge Vieira


Ok, setting white-space: normal; to the ion-card-header fixed this.

<ion-card-header style="white-space: normal;"> could be placed in css file as well.

Plunker: http://plnkr.co/edit/GjDmJBNMdnoPiteAKpDB

like image 14
Ivar Reukers Avatar answered Nov 19 '22 18:11

Ivar Reukers