PDA

View Full Version : Table Layout panel - how to color cell background



rebeccapeltz
14 Jan 2011, 3:04 PM
I'm trying to dynamically set the background color of a table layout cell. I can do this using cellCls. The background is colored, but the div, P, or span that contains my data within the html is not colored. I have to color the div, P, or span with it's own style tag. Then it appear that the div, P, or span inherits the border from the table and this looks funny. I worked around it by setting the lineheight, but this is not a good solution.

Here's my configuration and css:


html:'<div class="alert-cell">' + docNotCompletedCnt + '</div> ',
cellCls: 'alert-cell'


.alert-cell{
background-color:red;
font-weight:bold;
color:white;
margin:0px;
line-height:25px;
padding:0px;
border-width:0px;
border-spacing:0px;
}