HTML :
<asp:Table>
<asp:TableRow CssClass="columnHeader">
<asp:TableCell BorderWidth="0px" BackColor="White"></asp:TableCell>
<asp:TableCell ColumnSpan="3" ><asp:Label ID="lbl_Dimension" runat="server" >Dimension in CM</asp:Label></asp:TableCell>
<asp:TableCell ColumnSpan="2" ><asp:Label ID="lbl_Weight" runat="server" >Weight in KG</asp:Label></asp:TableCell>
<asp:TableCell ><asp:Label ID="lbl_Volume" runat="server" >Volume</asp:Label></asp:TableCell>
</asp:TableRow>
<asp:TableRow CssClass="columnHeader">
<asp:TableCell BorderWidth="0px" BackColor="White"></asp:TableCell>
<asp:TableCell ><asp:Label /></asp:TableCell> (x6)
</asp:TableRow>
<asp:TableRow>
<asp:TableCell CssClass="rowHeader"><asp:Label ID="lbl_Pallet" runat="server" >Pallet</asp:Label></asp:TableCell>
<asp:TableCell ><asp:Label /></asp:TableCell> (x6)
</asp:TableRow>
<asp:TableRow >
<asp:TableCell CssClass="rowHeader"><asp:Label ID="lbl_Master" runat="server" >Master</asp:Label></asp:TableCell>
<asp:TableCell ><asp:Label /></asp:TableCell> (x6)
</asp:TableRow>
<asp:TableRow>
<asp:TableCell CssClass="rowHeader"><asp:Label ID="lbl_Inner" runat="server" >Inner</asp:Label></asp:TableCell>
<asp:TableCell ><asp:Label /></asp:TableCell> (x6)
</asp:TableRow>
</asp:Table>
CSS :
.drawBorder table
{
border: 0 solid Black;
border-spacing: 0;
margin-top: 30px;
border-collapse: collapse;
}
.drawBorder th, .drawBorder td
{
border: 1px solid Black;
width: 80px;
}
.rowHeader
{
background-color: #f4e8d0;
font-weight: bold;
}
.columnHeader
{
text-align: center;
background-color: #f4e8d0;
border: 1px solid Black;
font-weight: bold;
}
결과에 IE :
크롬에결과:
그래서 ... 두 질문 :
- 왜 IE 내 첫 번째 행에
ColSpan
을하지 않는 이유는 무엇입니까? - 왜
border-collapse: collapse;
이 작동하지 않습니까? http://jsfiddle.net/YVEsJ/1/은 그냥 보이는 :
테이블이 잘못되었습니다 - 테이블의 각 행에 대해 열의 수가 일치하지 않습니다. – Pete
게시물의 하단에 전체 HTML 코드를 게시하지 않았 음을 알려 드리겠습니다. 내 열 개수는 각 행에 동일합니다) – Shadam
바로 그때 당신은 HTML 코드가 아닌 asp 코드가 큰 차이가 있고 내가 코멘트 한 후에 x6을 더했습니다. – Pete