Search code examples
csswidthexpand

CSS text in <p> doesn't expand as it should


i have a paragraph within a div, which doesn't expand to fit its contents, but only expands as far as the longest word goes. i have not set the width of either the containing div or the paragraph so i am unsure why it behaves like this?

the site in question is http://bit.ly/JV5I0Z mouse over the green squares

any idea why this happens??


Solution

  • Try using

    whitespace: nowrap;
    

    On those <p> elements.