提问者:小点点

css表高度始终相同


我有这张桌子

<table class="style1" cellpadding="0" cellspacing="0">
    <tr class="style4">
        <td class="style23">
            Inbound Calls
        </td>
        <td class="style20">
         <span style="vertical-align:middle" runat="server" id="spInBC"></span>

        </td>
        <td class="style2" colspan="2" rowspan="5" style="text-align:center" >

            <asp:Chart ID="Chart1" runat="server" Height="200px" Width="200px">
                <Titles>
                    <asp:Title Font="Calibri, 14pt, style=Bold" ForeColor="#666666" Name="Title1" 
                        Text="Total Call Status">
                    </asp:Title>
                </Titles>
                <series>
                    <asp:Series CustomProperties="DrawingStyle=Cylinder,
 MaxPixelPointWidth=50" IsValueShownAsLabel="True" Name="Series1" ShadowOffset="2">
                    </asp:Series>
                </series>
                <chartareas>
                    <asp:ChartArea BackGradientStyle="TopBottom" BackSecondaryColor="#B6D6EC" 
                        BorderDashStyle="Solid" BorderWidth="1" Name="ChartArea1">
                        <AxisX>
                            <MajorGrid Enabled="False" />
                        </AxisX>
                    </asp:ChartArea>
                </chartareas>
            </asp:Chart>



            </td>
        <td class="style2" rowspan="5" valign="top" style="text-align:center">

         <asp:Chart ID="ChtAgentCalls" runat="server" Height="200px" Width="200px">
         <Titles>


        </td>
    </tr>
    <tr class="style4">
        <td class="style23">IVR</td>
        <td class="style20">
        <span style="vertical-align:middle" runat="server" id="spIVR"></span></td>
    </tr>
    <tr class="style4">
        <td class="style23">
        Agents</td>
        <td class="style20"><span ID="spAgentAtt" runat="server" style="vertical-align:middle"></span></td>
    </tr>
    <tr class="style4">
        <td class="style23">
            Abandoned</td>
        <td class="style20">
         <span style="vertical-align:middle" runat="server" id="spTAC"></span>
        </td>
    </tr>
    <tr class="style4">
        <td class="style23">
        Cancelled</td>
        <td class="style20"><span style="vertical-align:middle" runat="server" id="spCC"></span></td>
    </tr>
    <tr>
        <td class="style23">
        In Queue</td>
        <td class="style20"><span style="vertical-align:middle" runat="server" id="spCQ"></span></td>
        <td rowspan="4" style="text-align:center">
            <asp:Chart ID="ChtCalls" runat="server" Height="200px" Width="200px">
                <Titles>
                    <asp:Title Font="Calibri, 14pt, style=Bold" ForeColor="#666666" Name="Title1" 
                        Text="Abandoned Calls">
                    </asp:Title>
                </Titles>
                <series>
                    <asp:Series ChartType="Line" Color="Red" Name="Series1">
                    </asp:Series>
                </series>
                <chartareas>
                    <asp:ChartArea BackGradientStyle="TopBottom" BackSecondaryColor="#B6D6EC" 
                        BorderDashStyle="Solid" BorderWidth="1" Name="ChartArea1">
                        <AxisX>
                            <MajorGrid LineColor="#808080" />
                        </AxisX>
                        <AxisY>
                            <MajorGrid LineColor="#808080" />
                        </AxisY>
                    </asp:ChartArea>
                </chartareas>
            </asp:Chart>
        </td>
        <td colspan="2" rowspan="4" valign="top" style="text-align:center">
            <asp:Chart ID="ChtCampaign" runat="server" Height="200px" Width="200px">
                <Titles>
                    <asp:Title Font="Calibri, 14pt, style=Bold" ForeColor="#666666" 
                        Name="TotalCallsperCampaign" Text="Calls per Campaign">
                    </asp:Title>
                </Titles>
                <legends>
                    <asp:Legend Alignment="Center" Docking="Bottom" IsTextAutoFit="true" 
                        LegendStyle="Table" Name="Default"/>
                </legends>
                <series>
                    <asp:Series ChartType="Pie" CustomProperties="DrawingStyle=Pie, 
 PieDrawingStyle=Concave, MaxPixelPointWidth=50" IsValueShownAsLabel="True" Name="Series1" 
                        ShadowOffset="2">
                    </asp:Series>
                </series>
                <chartareas>
                    <asp:ChartArea Area3DStyle-Enable3D="true" BackGradientStyle="TopBottom" 
                        BackSecondaryColor="#B6D6EC" BorderDashStyle="Solid" BorderWidth="1" 
                        Name="ChartArea1">
                        <Area3DStyle Enable3D="True" />
                    </asp:ChartArea>
                </chartareas>
            </asp:Chart>
        </td>
    </tr>
    <tr class="style4">
        <td class="style23">
        Ghost Calls</td>
        <td class="style20"><span style="vertical-align:middle" runat="server" id="spGC"></span></td>
    </tr>
    <tr class="style4">
        <td class="style23">Outbound Calls</td>
        <td class="style20"><span style="vertical-align:middle" runat="server" id="spOutBC"></span></td>
    </tr>
    <tr class="style4">
        <td class="style23">
            Total Calls</td>
        <td class="style20"><span style="vertical-align:middle" runat="server" id="spTC"></span></td>
    </tr>

</table>  

用这个css

.style1
        {
            width: 100%;
            height:60%;
        }

不管我改变了什么高度。它没有改变。它保持不变。

我想放大它。

请帮忙


共1个答案

匿名用户

你需要给. style1一个容器。百分比高度需要父容器。然后它从父级继承固定值,