//此标签中字体为红色,我想让其内容居中显示,并该label区域呈灰色显示,以区别别的区域,请问如何设?必给分!
<asp:Label ID="Label4" runat="server" ForeColor="Red" Height="71px" Style="z-index: 109;
            left: 409px; position: absolute; top: 81px" Text="请输入合法的IP地址,其数值范围介于0至255之间!"
            Width="194px"></asp:Label>

解决方案 »

  1.   

    类似于
    http://reg.163.com/reg0.shtml#username 中右边的说明部分!
      

  2.   

    <table>
    <tr>
    <td height="50"><input type=text />
    </td>
    <td width="200" style="background-color:darkgray; color:red;">请输入合法的IP地址,其数值范围介于0至255之间!</td>
    </tr>
    </table>
      

  3.   

    <asp:Label ID="Label4" runat="server" ForeColor="Red" Height="71px" Style="z-index: 109; left: 409px; position: absolute; text-align:center; background-color:#cccccc;  padding:10px 0 0 0; top: 81px; right: 230px;" Text="请输入合法的IP地址,其数值范围介于0至255之间!" Width="194px"></asp:Label>
      

  4.   

    <div align="center"><asp:Label ID="Label4" Text="请输入合法的IP地址,其数值范围介于0至255之间!" style="background-color:#cccccc;"
            runat="server"  ForeColor="Red"></asp:Label></div>