开发者

HTML form with table cell height problem

开发者 https://www.devze.com 2022-12-26 23:50 出处:网络
I have several forms like this: <tablewidth=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"table_std\">

I have several forms like this:

<table  width="100%" border="0" cellpadding="0" cellspacing="0" class="table_std">

        <tr id="exam_String_newValue_row">
          <td width="150" class="table_defaultHeaderColumn">Προκαθορισμένη Τιμές</td>
          <td width="802" class="table_defaultHeaderColumn" >
            <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
          </td>
        </tr>
        <tr>
          <td width="150" class="table_defaultHeaderColumn">Διάγνωση - Αληθής</td>
          <td width="802">
            <input name="Exam_String_value" type="text" style="width:600px" id="textfield2" />
    开发者_如何学运维     </td>
        </tr>
        <tr>
          <td width="150" class="table_defaultHeaderColumn">Διάγνωση - Ψευδής</td>
          <td width="802">
            <input name="Exam_String_value" type="text" style="width:600px"  id="textfield2" />
         </td>
        </tr>
      </table>

css

  .table_defaultHeaderColumn {
        font-size: 11px;
    }
    .input_std {
        width: 200px;
    }
    .input_small {
        width: 4em;
    }

    .table_std {
        border-collapse:collapse;
    }
    .table_std td {
        padding-top: 1px;

        padding-bottom: 1px;
    }

The problem is the height of the cells.... isnt equal in all browsers... any solution?


I found why... The solution is to set vertical align to middle otherwise


Before doing any css changes, set margin and padding to 0 then change if needed. Also set line-height to 1em.

0

精彩评论

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