Making div responsive

i am new with app development using ionic 2. i have a div under ion-list which contains long text.but for some reason text doesn’t format.
attached is screensho

custom the sass or used component such as card

1 Like

What is the styling on the div? You can use an ion-item with the text-wrap attribute:

  <ion-item text-wrap>
    Multiline text that should wrap when it is too long
    to fit on one line in the item. Attribute on .item

ah,Updated doc as soon as possible

Thankkkkkk youuuuuuu…finally found the answer :slight_smile: …!!

How to make a new line for \n ? text-wrap not work for \n

<br/> gives you a new line in HTML.

If I have a ‘\n’ in json {‘msg’:‘abc \n def’} , my question is how to display ‘abc’ and ‘def’ in multiline ?

Cool! But, how do this in ion-title?

    <ion-title text-wrap>text text text text text text text text text text text text ?</ion-title>

the code above not working

Does anybody know the answer? I have the same problem: how to make ion-title responsive. I tried text-wrap and responsive-sm, but neither works.


use something of the sort in your css:

p{ white-space: pre-line; }

1 Like

Aparantely, is not possible make ion-title responsive

Yeah, I figured it out already. Which is kind of strange feature. I don’t really understand the motivation behind it. I think Ionic team should re-think it.