html - table content out of the border of table td -
I want to set border widths on TD. But I do not know why the width of the table is? Here is a demo of my problem:
I just want to run away from the blue interior Still, is it confused that even blue outside the table?
Here is the html code:
& lt; Table range = "1" & gt; & Lt; TR & gt; & Lt; Td style = "border-left: 10px solid blue" & gt; Content & lt; / Td> & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;
Here is the CSS code:
Table {range: 1px solid # 000; Degradation: collapse; Border-spacing: 0; } Tr {Border-Top: 1px solid # 000} tr + tr (border-top: 1px solid red;) TD (border-left: 1px solid # 000;) TD + TD {border-left: 1px solid Red;}
for the first td
in the CSS The margin is set
TD {boundary-left: 1px solid # 000;}
So when you set it again in 10px , Then
You can add a div or span to create it, it works
< Strong>
& lt; table limit = "1" & gt; & lt; tr & gt; & lt; td & gt; Lt; span style = "border-left: 10px solid blue" & gt; & lt; span & gt; content & lt; / td> & lt; td & gt; content & lt; / td & gt; LT; TD & gt; Content & lt; / TD & gt; & lt; / TR & gt; & lt; TR & gt; & lt; TD & gt; Content & lt; / Td & gt; & lt; TD & Gt; Content & lt; / TD & gt; & lt; TD & gt; Content & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; TD & gt; Content & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;
Or replace it directly in CSS
TD {boundary-left: 10px solid blue; }
Or you can just
table {range: 1px solid # 000; Boundary: Separate; Border-spacing: 0; }
instead of
table {range: 1px solid # 000; Degradation: collapse; Border-spacing: 0; }
Comments
Post a Comment