5

I have div without width defined:

|                           |
|------------------         |
|some testing text|         |
|------------------         |
|                           |

when viewport is shrinking it looks like this:

|                 |
|-----------------|
|some testing     |
|text             |
|-----------------|
|                 |

what I need is fit div width to text after line break:

|                 |
|-------------    |
|some testing|    |
|text        |    |
|-------------    |
|                 |

I tried using javascript to change width on resize, but sometimes there hundreds of divs and its not working very well..

S. Troy
  • 53
  • 3

0 Answers0