2014-02-06 146 views
0

我知道這是一個非常常見的問題,但我已經查找了每一個線程,沒有任何東西似乎有幫助。HTML頌歌真的搞砸了,但是,我會在這裏發佈它。我把所有的邊界都設置爲無,但它看起來仍然是白色的,看起來很糟糕。請幫忙。表格邊框在灰色背景上看起來是白色的

<style type="text/css"> 
    .auto-style4 { 
     width: 114%; 
     border: none; 
    } 

    .auto-style1 { 
     width: 206px; 
     text-align: right; 
     border: none; 
    } 

    .auto-style2 { 
     width: 935px; 
     border: none; 
    } 

    .auto-style6 { 
     width: 935px; 
     text-align: center; 
     background-color: #C0C0C0; 
     border: none; 
    } 

    .auto-style7 { 
     width: 198px; 
     height: 23px; 
     border: none; 
    } 

    .auto-style9 { 
     height: 23px; 
     border: none; 
    } 

    .auto-style10 { 
     width: 198px; 
     height: 196px; 
     border: none; 
    } 

    .auto-style11 { 
     width: 935px; 
     text-align: left; 
     height: 196px; 
     border: none; 
    } 

    .auto-style12 { 
     border: none; 
    } 

    .auto-style13 { 
     width: 884px; 
     text-align: left; 
     height: 23px; 
     background-color: #C0C0C0; 
     border: none; 
    } 

    .auto-style15 { 
     width: 198px; 
     height: 30px; 
     border: none; 
    } 

    .auto-style16 { 
     border-color: inherit; 
     border-width: 0; 
     width: 935px; 
     text-align: center; 
     background-color: #C0C0C0; 
     height: 30px; 
     border: none; 
    } 

    .auto-style17 { 
     height: 30px; 
     border: none; 
    } 

    .auto-style19 { 
     border-style: none; 
     padding: 0px; 
     width: 935px; 
     text-align: center; 
     background-color: #C0C0C0; 
     height: 23px; 
     border: none; 
    } 

    .auto-style20 { 
     border-color: inherit; 
     border-width: 0; 
     width: 935px; 
     text-align: center; 
     background-color: #C0C0C0; 
     border: none; 
    } 
</style> 

下面是我的HTML代碼搞砸了。

<div style="width: 1400px; margin: 0 auto;"> 
    <table class="auto-style4" border="0" cellspacing="0"> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style2"> 
       <asp:ScriptManager ID="ScriptManager1" runat="server"> 
       </asp:ScriptManager> 
      </td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style2"></td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style10"></td> 
      <td class="auto-style11"> 
       <asp:Image ID="Image1" Height="218px" Width="935px" runat="server" /> 
      </td> 
      <td class="auto-style12"></td> 
     </tr> 
     <tr> 
      <td class="auto-style7"></td> 
      <td class="auto-style19"> 
       <asp:Label ID="lblSlideshow" runat="server"></asp:Label> 
      </td> 
      <td class="auto-style9"></td> 
     </tr> 
     <tr> 
      <td class="auto-style7"></td> 
      <td class="auto-style19"> 
       <asp:Label ID="Label2" runat="server" ForeColor="#336699" Style="" Text="Schedule A Callback"></asp:Label> 
      </td> 
      <td class="auto-style9"></td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style20">&nbsp;</td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style15"></td> 
      <td class="auto-style16">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<asp:Label ID="Label3" runat="server" Text="Name :"></asp:Label> 
       &nbsp;<asp:TextBox ID="txtName" runat="server" Style="" Width="198px"></asp:TextBox> 
       &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ErrorMessage="Enter Name" ForeColor="Red">*</asp:RequiredFieldValidator> 
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> 
      <td class="auto-style17"></td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style20">&nbsp;</td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style20"> 
       <asp:Label ID="Label4" runat="server" Text="Contact No :"></asp:Label> 
       <asp:TextBox ID="txtContact" runat="server" Width="198px" Style=""></asp:TextBox> 
       &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtContact" ErrorMessage="Enter Contact No" ForeColor="Red">*</asp:RequiredFieldValidator> 
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<asp:Label ID="Label7" runat="server" Text="Email :"></asp:Label> 
       &nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;<asp:TextBox ID="txtMail" runat="server" Style="" Width="198px"></asp:TextBox> 
       <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtMail" ErrorMessage="Enter Email" ForeColor="Red">*</asp:RequiredFieldValidator> 
      </td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style20">&nbsp;</td> 
      <td>&nbsp;</td> 
     </tr> 
     <tr> 
      <td class="auto-style3">&nbsp;</td> 
      <td class="auto-style20"> 
       <asp:Label ID="Label5" runat="server" Text="City :"></asp:Label> 
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<asp:TextBox ID="txtCity" runat="server" Width="198px" Style=""></asp:TextBox> 
       &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtCity" ErrorMessage="Enter City" ForeColor="Red">*</asp:RequiredFieldValidator> 
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<asp:Label ID="Label8" runat="server" Text="State :"></asp:Label> 
       &nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" Style="" Width="208px"> 
<asp:ListItem Value="Select">Select</asp:ListItem> 
<asp:ListItem>Andhra Pradesh</asp:ListItem> 

<asp:ListItem>West Bengal</asp:ListItem> 
       </asp:DropDownList> 
      </td> 
      <td>&nbsp;</td> 
     </tr> 
    </table> 
</div> 

輸出我的代碼:

enter image description here

+0

你的html在哪裏? – SpiderCode

+0

沿着 – Mash

+0

添加我的HTML檢查我的回答。它會幫助你解決你的問題。不要忘記upvote並將其標記爲答案,以便它可以幫助其他開發者 – SpiderCode

回答

1

就使所有的邊框顏色爲灰色..

+0

做到了。不工作 – Mash

+0

請,你可以告訴我的代碼在小提琴.. – Vegeta

0

嘗試......

border:none !important; 
+0

我很壞的HTML。那麼你想讓我更新這個?在HTML或CSS?在css中只有 – Mash

+0

...更改所有「border:none;」到「邊界:無!重要」; – Vegeta

+0

你有沒有試過這個...「border-color:#C0C0C0;」在CSS中。 – Vegeta

0

添加cellspacing =「0」你見下表提到:

<table class="auto-style4" border="0" cellspacing="0"> 

這將刪除默認間距的表格單元格

0

@Mash這不是一個邊界問題之間..只是設置你的表的背景顏色...修改類這樣

.auto-style4 { 
     width: 114%; 
     border:none; 
     background-color: #C0C0C0; 
    } 
0

嘗試......

替換代碼..

.auto-style4 { 
    width: 114%; 
    border: none; 
    border-spacing:0px; 

} 
相關問題