textarea影响其他tds

时间:2016-06-25 13:20:49

标签: html css html-table

我有这个简单的form

enter image description here

然后出现问题:

enter image description here

请注意,当我调整<td>的大小时,包含新邮件,收件箱和设置 buttons的{​​{1}}会发生变化。那么我该如何解决这个问题呢。

编辑这里是代码(抱歉):

textarea

1 个答案:

答案 0 :(得分:0)

https://jsfiddle.net/c28t27x2/

<table>
<tr>
<td>
<table style="border: 3px solid red; margin-left: 0px; width:43%; " align="left">
<thead>
<tr>
    <td style="border: 3px solid gray; padding: 0; margin: 0; width: 50px;">
        <form method="post" style="margin: 0; padding: 0;">
            <input type="submit" name="create" value="New&nbsp;Message" style="margin: 0; padding: 0;">
        </form>
    </td>
    <td style="border: 3px solid gray; padding: 0px;  margin: 0; width: 50px;">
        <form method="post" style="margin: 0; padding: 0;">
            <input type="submit" name="inbox" value="Inbox" style="margin: 0; padding: 0;">
        </form>
    </td>
    <td style="border: 3px solid gray; padding: 0px;  margin: 0; width: 50px;">
        <form method="post" style="margin: 0; padding: 0;">
            <input type="submit" name="sent" value="Sent" style="margin: 0; padding: 0;">
        </form>
    </td>
    <td style="border: 3px solid dimgray; padding: 0; margin: 0; width: 100%;">

    </td>
    </tr>
</thead>
</table>
</td>
</tr>
<tr>
<td>
<table style="border: 3px solid red; margin-left: 0px; width:43%; " align="left">

    <tbody>
<tr>
    <td style="border: 3px solid blue; padding: 0px; margin: 0px; display: <?php echo escape($create_d); ?>" colspan="4">
        <form method="post" style="padding: 0px;">
            <label for="message">Create Msg</label><br>
            <input type="hidden" name="token" value="<?php echo $token; ?>">
            <label for="to">To:</label>
            <input type="text" id="to" name="to" placeholder="IGN"><br>
            <textarea id="message" name="msg" maxlength="1000"></textarea><br>
            <input type="submit" name="create" value="Send">
        </form>
    </td>

    <td style="border: 3px solid red; padding: 0px; margin: 0px; display: <?php echo escape($inbox_d); ?>" colspan="4">
        <?php echo $inbox_tbl; ?>
    </td>
    <td style="border: 3px solid green; padding: 0px; margin: 0px; display: <?php echo escape($sent_d); ?>" colspan="4">
        <?php echo $sent_tbl;?>
    </td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>