Make text in paraghapghs in div overflow instead of new lines

Total Post:117

Points:821

 1485  View(s)
Ratings:
Rate this:
Hi Expert!

I have several pretty longs lines in a paragraph:

<div style="overflow: auto"> 
    <p> 
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccc
    </p> 
    <p> 
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccc
    </p> 
</div>
and window width less that width of the paragraph (a's + b's + c's). Currently scroll will appear only if width of any of components (a, b, or c) is more 

that width of the window and over components are carried to the new lines. I want contents of each paragraph appear on the same line with a scroll. How can 

I treat each paragraph as a string, so contents of the paragraph is treated like a single line?

Thanks in advance! 
  1. Re: Make text in paraghapghs in div overflow instead of new lines

    Hi Jayprakash!


    try this way, i hope it resolve your problem

    p {
        white-space: nowrap;
        overflow: auto
    }

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.