0

Hi. I wanted to ask this a long time ago.. but never get the chance.
How do I actually style the table td to the width I wanted? It didn't happen for me.
It didn't happen in separate row.
I try to set the td width but all it did is just follow the td width of another row.

So somebody help me please.

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by jcarbillon
0

Are you trying to make a row cell of a different width to rows above or below? You would need to either place a new table inside your table row (which gets messy very quickly) or you could increase the number of columns in your table and use the colspan attribute to dictate how many columns each cell takes up.

<tr>
  <td colspan="2"></td>
</tr>
<tr>
  <td colspan="1"></td>
</tr>

Here the first td will be twice as long as the one below. This will leave gaps and possibly make your table look pretty uneven though.

0

a little revision

<table>
    <tr>
       <td colspan="2"></td>
    </tr>
    <tr>
       <td></td>
       <td></td>
    </tr>
   <table>

if you want just create new table inside your <td></td> so you could set the table width different from another table.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.