How to give line break in an XML Feed according to page width?

3

I have a table with 15 items and must be done to break the columns when the total size of the items reach the full width of the table.

Ex:

What's happening:

|--- WIDTH 300px ---|

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15

What do I need to do:

|--- WIDTH 300px ---|

01 02 03 04 05 06

07 08 09 10 11 12

13 14 15

I have this feed way of example and my code current is this:

<div style="width:300px; max-width:300px">
    <?php
       $a = file_get_contents("http://v2.afilio.com.br/aff/aff_boutique_show_ads.php?boutiqueid=37930-895843&currencypos=0&display_img=1&diplay_name=1&diplay_price=1&thumbsize=80%&truncate_desc=15&numrows=1&numcols=20&colorname=000000&colorprice=E30000&bkcolor=FFFFFF&bordercolor=FFFFFF&self_target=0&");
       echo ($a);
    ?>    
</div>

I would also like to know, you can use JavaScript instead of PHP?

    
asked by anonymous 14.10.2015 / 18:17

1 answer

1

Mathew,

You can actually solve this by simply adding style word-wrap: break-word; to your div.

Example, I put 120px to give the result of your example:

<div style="width:120px;word-wrap: break-word; max-width:120px">
    <p>
    01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
    </p>
</div>
    
10.12.2015 / 19:46