تسجيل الدخول | التسجيل | الأسئلة المتكررة
Anonymous

Ridiculous Table Problem - Rowspan Issue

+ إضافة رد

2 مشاركة صفحة 1 من 1


Ridiculous Table Problem - Rowspan Issue

بواسطة AARRGGHHH » الثلاثاء يناير 02, 2018 8:51 am

I have been using HTML for 20+ years and have never had to post a question in a forum. Until now.

I am building a table with a large central cell and smaller surrounding cells. The cell structure should look like this: https://imgur.com/Z8tXX1Z

However, for some reason, colspan="2" is working but rowspan="2" is being ignored when a javascript loop populates the cells. And I end up with this: https://imgur.com/QEuyEz9 The center cell is 2 columns in width but only 1 row in
height.

Here is my code. This HAS to be something simple I'm just overlooking...

CODE: تحديد الكل

<table id="table0" style="margin-left:auto; margin-right:auto; border-color:#C0C0C0 #C0C0C0 #606060 #606060; ">
<tr>
   <th id="tHeader1">More Brightness / Less Contrast</th>
   <th id="tHeader2">More Brightness</th>
   <th id="tHeader3">More Brightness / More Contrast</th>
   <th id="tHeader4">More Brightness / More Contrast</th>
</tr>
<tr>
   <td id="tData1" onclick="click1()"><canvas id="canvas1" width="1" height="1"></canvas></td>
   <td id="tData2" onclick="click2()"><canvas id="canvas2" width="1" height="1"></canvas></td>
   <td id="tData3" onclick="click3()"><canvas id="canvas3" width="1" height="1"></canvas></td>
   <td id="tData4" onclick="click4()"><canvas id="canvas4" width="1" height="1"></canvas></td>
</tr>
<tr>
   <th id="tHeader5">Original Image</th>
   <th id="tHeader6" colspan="2">ORIGINAL IMAGE</th>
   <th id="tHeader7">Original Image</th>
</tr>
<tr>
   <td id="tData5" onclick="click5()"><canvas id="canvas5" width="1" height="1"></canvas></td>
   <td id="tData6" onclick="click6()" rowspan="2" colspan="2"><canvas id="canvas6" width="1" height="1"></canvas></td>
   <td id="tData7" onclick="click7()"><canvas id="canvas7" width="1" height="1"></canvas></td>   
</tr>
<tr>
   <th id="tHeader8">Less Brightness / Less Contrast</th>   
   <th id="tHeader9">Less Brightness / More Contrast</th>
</tr>
<tr>
   <td id="tData8" onclick="click7()"><canvas id="canvas8" width="1" height="1"></canvas></td>
   <td id="tData9" onclick="click8()"><canvas id="canvas9" width="1" height="1"></canvas></td>      
</tr>
<tr>
   <th id="tHeader10">More Brightness / Less Contrast</th>
   <th id="tHeader11">More Brightness</th>
   <th id="tHeader12">More Brightness / More Contrast</th>
   <th id="tHeader13">More Brightness / More Contrast</th>
</tr>
<tr>
   <td id="tData9" onclick="click9()"><canvas id="canvas10" width="1" height="1"></canvas></td>
   <td id="tData10" onclick="click10()"><canvas id="canvas11" width="1" height="1"></canvas></td>
   <td id="tData11" onclick="click11()"><canvas id="canvas12" width="1" height="1"></canvas></td>
   <td id="tData12" onclick="click12()"><canvas id="canvas13" width="1" height="1"></canvas></td>
</tr>
</table>


Thank you
صورة العضو الشخصية

AARRGGHHH

  • مشاركات: 2
  • اشترك في: الثلاثاء يناير 02, 2018 8:14 am

Re: Ridiculous Table Problem - Rowspan Issue

بواسطة AARRGGHHH » الثلاثاء يناير 02, 2018 9:54 am

Oh FFS...

I forgot to count the table headers as a row. colspan="2" rowspan="3"

Never mind...
صورة العضو الشخصية

AARRGGHHH

  • مشاركات: 2
  • اشترك في: الثلاثاء يناير 02, 2018 8:14 am


+ إضافة رد

صفحة 1 من 1