This is without height attribute: http://jsfiddle.net/karthik64/pFcpX/
And this with height attribute: http://jsfiddle.net/karthik64/pFcpX/1/
The problem is I need to set a fixed ‘height’ attribute to get background-color as black and if I remove the height attribute from the CSS property , the background-color wont be black. I have to tell you that the height of my div here, is a dynamic one. It depends on the data fetched from database.
I have tried !important, something like that, but it did not work.
Add
overflow: hiddento the style of the outerdivSee this JsFiddle