Forums

[resolved] Adapting text to fill a div (3 posts)

  1. Matleouf
    Member
    Posted 2 years ago #

    Hi !

    I'd like to be able to adapt the quantity of text to the width and height of a div.
    Actually, when I put too much text in my div, it just "overflows" and goes outside its borders.
    Is there any way to know if some text will overflow one div, and adapt it ?
    I could always count the number of chars I can put in the box and adapt to it, but there's also an image inside the div and it could screw things up (not counting the use of bold text...).

    If anyone has a solution, I'd be glad to read it :)

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try adding overflow:hidden; to the div's CSS.

  3. Matleouf
    Member
    Posted 2 years ago #

    Fantastic !
    How could I not have been aware of that one...
    Thanks a lot, it works :)

Topic Closed

This topic has been closed to new replies.

About this Topic