tags:

views:

72

answers:

1

Hi,

How do I get the IE gradient function here in this code sample to completely fill the table cell? With the code given below, I could only get it to cover the upper half of the cell. alt text

<HTML>
<HEAD>
<style>
<!--table
.cl1
    {
    font-family:Comic Sans MS;
    font-size:11.0pt;
    color:#800000;
    border-left:1.5pt solid #000000;
    border-top:1.5pt solid #000000;
    border-right:1.5pt solid #000000;
    border-bottom:1.5pt solid #000000;
    background-color:#ffffff;
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ffffff', EndColorStr='#99cc00')   
progid:DXImageTransform.Microsoft.dropshadow(Color='#660000', Positive='true', OffX=0, OffY=0);
    }
-->
</style></HEAD>
<BODY>

<table x:str cellspacing=0 style='table-layout:fixed; border-left:1.0pt solid; border-top:1.0pt solid; border-right:1.0pt solid; border-bottom:1.0pt solid; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-bottom-color:#c0c0c0; '>
 <col style='width:67pt;'>

<tr style='height:28.00pt'>
 <td class=cl1 style='width:67pt;'>Cell Text</td>
</tr>
</BODY>
</HTML>
+1  A: 

I added the line:

line-height: 220%;

To your .cl1 style, and it filled completely. Obviously this is not a final fix, but it definitely points to the line-height property as having something to do with it.

JYelton
a line-height of 23pt also works
JYelton
Thanks. I think I'll use the value 23pt, instead of the percentage, since I can set it through code, by subtracting the border thickness (1.5+1.5) and the padding (1+1) from the row height here (28 pt). This gives the line height, for the entire set of cells in the table I need to set.
Gopal