The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Why doesn't parent element grow with the overflown text?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #247177

    Here’s the example:

    The problem:
    The .text element has padding, but because it doesn’t grow when text is overflown, we can scroll to the end, but only so far that the right-most text touches the right edge. Screenshot

    I wish that it had the padding of the .text element at the end.

    How can I make the .text element grow together with its text?


    Oh, found the solution.
    Just make the .text element an inline-block.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.