我在head中定义了css样式
<HEAD>
<style type="text/css">.a13 {
FONT-SIZE: 13px; COLOR: #000000; TEXT-DECORATION: none }
</style>
</HEAD>
在head中定义了css样式,我在table中<table class=a13></table>
怎么没效果?是不是我的用法有问题?谢谢

解决方案 »

  1.   

    贴出你的全部代码、
    如果table里面有其它的样式,则外面的不起作用的
      

  2.   

    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication2.WebForm1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>WebForm1</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
    <style type="text/css">.a13 { FONT-SIZE: 13px; COLOR: #000000; TEXT-DECORATION: none }
    </style>
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="form1" runat="server">
    <table class="a13" cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tr>
    <th colSpan="3">
    <table cellSpacing="0" cellPadding="0" width="70%" border="0">
    <tr>
    <th colSpan="4">
    <div align="left">自动</div>
    </th>
    </tr>
    <tr>
    <th colSpan="4">
    <div align="left">定时方式</div>
    </th>
    </tr>
    <tr>
    <th colSpan="4">
    <asp:radiobutton id="RadioButton5" runat="server" Text="不测试"></asp:radiobutton>
    <asp:radiobutton id="RadioButton4" runat="server" Text="每分钟"></asp:radiobutton>
    <asp:radiobutton id="RadioButton3" runat="server" Text="每天"></asp:radiobutton>
    <asp:radiobutton id="RadioButton2" runat="server" Text="每周"></asp:radiobutton>
    <asp:radiobutton id="RadioButton1" runat="server" Text="每月"></asp:radiobutton>
    </th>
    </tr>
    <tr>
    <th colSpan="4">
    </th>
    </tr>
    <tr>
    <th colSpan="4">
    <div align="left">测试范围</div>
    </th>
    </tr>
    <tr>
    <th width="10%" rowSpan="3">
    </th>
    <td colSpan="3">本地</td>
    </tr>
    <tr>
    <td>起始端口</td>
    <td width="30%"><asp:dropdownlist id="DropDownList2" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="DropDownList4" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <td>终止端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist11" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="DropDownList5" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <th rowSpan="3">
    </th>
    <td colSpan="3">异地</td>
    </tr>
    <tr>
    <td>起始端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist12" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="DropDownList7" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <td>终止端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist13" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="DropDownList10" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    </table>
    </th>
    </tr>
    <tr>
    <th colSpan="3">
    </th>
    </tr>
    <tr>
    <th colSpan="3">
    <table cellSpacing="0" cellPadding="0" width="70%" border="0">
    <tr>
    <th align="left" colSpan="4">
    手动</th></tr>
    <tr>
    <th align="left" colSpan="4">
    测试范围</th></tr>
    <tr>
    <th width="10%" rowSpan="3">
    </th>
    <td colSpan="3">本地</td>
    </tr>
    <tr>
    <td>起始端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist25" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="Dropdownlist29" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <td>终止端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist26" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="Dropdownlist30" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <th rowSpan="3">
    </th>
    <td colSpan="3">异地</td>
    </tr>
    <tr>
    <td>起始端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist27" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="Dropdownlist31" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    <tr>
    <td>终止端口</td>
    <td width="30%"><asp:dropdownlist id="Dropdownlist28" runat="server">
    <asp:ListItem Value="PCM机号">PCM机号</asp:ListItem>
    </asp:dropdownlist></td>
    <td width="40%"><asp:dropdownlist id="Dropdownlist32" runat="server">
    <asp:ListItem Value="时隙号">时隙号</asp:ListItem>
    </asp:dropdownlist></td>
    </tr>
    </table>
    </th>
    </tr>
    <tr>
    <th>
    </th>
    <th align="left" width="30%">
    确定
    <asp:ImageButton id="ImageButton1" runat="server"></asp:ImageButton></th></tr>
    </table>
    </form>
    </body>
    </HTML>
    保证没有再多的样式了