.olddiv
{
    overflow:visible;
    background-color:#1D41A4;
    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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.