padding-right: 10px;
    padding-bottom: 20px;
    padding-left: 10px;

<div id="old" class="olddiv">

My text that overflows is visible but it does not have the div's background color. How do I get it to keep the background color?

Just in case anyone else has the same question.

My problem was that I had set a fixed height to my div. I changed the height to auto and it worked.

If threads are marked as solve, please mark this one as solved. Thanks-

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.