开发者

colspan question and help

Im currently coding an email and cant get my colspans to work, i just cant understand how they are supposed to work so if anyone could explain how you have multiple rows with multiple co开发者_如何学Golumns at different sizes then I would appreciate it loads!

Here is the code Iv been retying to set

 <table width="600" border="0" cellpadding="0" cellspacing="0">
  <tr>
        <td width="185" height="50" bgcolor="grey">Title 1</td>
        <td width="415" height="50" bgcolor="red">Title 2</td>
    </tr>
    <tr>
        <td width="600" height="50" bgcolor="pink" colspan="2">Title 3</td>
    </tr>
    <tr>
        <td width="365" height="50" bgcolor="grey">Title 4</td>
        <td width="235" height="50" bgcolor="orange">Title 5</td>
    </tr>   
</table>


You cannot explicitly set the width of the row column that contradicting to others. There's a work around here though the structure might looks ugly. Then please do read about tables for better understanding.

For the work around you can set an invisible row that will occupy for the space you needed.

Se related question here

Now for your problem you can try this. http://jsfiddle.net/cWF33/

If your table structure is always like this. Have it change to table less. What I mean is use of div with css

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜