I'm trying to merge two columns in a table for a very simple operation. It sounds easy with Callspans, but if I merge different columns without leaving any row without any merged columns, then changing shape completely gets messed up please visit the following example See or take a look and try the following code:
Good:
& lt; Table width = "700px" & gt; & Lt; TR & gt; & Lt; Width = "100px" & gt; 1: 100px & lt; / V & gt; & Lt; Td width = "300px" & gt; 2: 300px & lt; / Td> & Lt; Td width = "200px" & gt; 3: 200px & lt; / Td> & Lt; Td width = "100px" & gt; 4: 100px & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Width = "100px" & gt; 1: 100px & lt; / V & gt; & Lt; Td colspan = 2 width = "500px" & gt; 2 & amp; 3: 500px & lt; / Td> & Lt; Td width = "100px" & gt; 4: 100px & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Width = "100px" & gt; 1: 100px & lt; / V & gt; & Lt; Td width = "300px" & gt; 2: 300px & lt; / Td> & Lt; Td colspan = 2 width = "300px" & gt; 3 & amp; 4: 300px & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;
Bad:
& lt; Table width = "700px" & gt; & Lt; TR & gt; & Lt; Width = "100px" & gt; 1: 100px & lt; / V & gt; & Lt; Td colspan = 2 width = "500px" & gt; 2 & amp; 3: 500px & lt; / Td> & Lt; Td width = "100px" & gt; 4: 100px & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Width = "100px" & gt; 1: 100px & lt; / V & gt; & Lt; Td width = "300px" & gt; 2: 300px & lt; / Td> & Lt; Td colspan = 2 width = "300px" & gt; 3 & amp; 4: 300px & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;
It sounds pretty easy, but I can not understand it!
Do not include width values on individual cells. It has been deprecated since at least html 4.01 (, if you keep in mind that w3c does not approve your coding).
Instead, to add elements to the table, such as:
& lt; Table width = "700px" & gt; & Lt; Colon width = "100px" /> & Lt; Colon width = "300px" /> & Lt; Colon width = "200px" /> & Lt; Colon width = "100px" /> & Lt; TR & gt; & Lt; Th & gt; 1: 100px & lt; / V & gt; & Lt; Td colspan = "2" & gt; 2 & amp; Amp; 3: 500px & lt; / Td> & Lt; Td> 4: 100px & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Th & gt; 1: 100px & lt; / V & gt; & Lt; Td> 2: 300px & lt; / Td> & Lt; Td colspan = "2" & gt; 3 & amp; Amp; 4: 300px & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;
& lt; Colonel & gt; The element is OK to serve as a placeholder, on which the features that apply to a particular column are suspended.
Comments
Post a Comment