html - IE更改中的文本对齐

标签 html css

body {
  text-align: left;
  color: #000810;
}
.settings-edit-table {
  width: 100%;
  margin: 15px 0 15px;
}
.settings-edit-table th,
.settings-edit-table td {
  padding: 0 0 8px;
  vertical-align: top;
  line-height: 29px;
}
.settings-edit-table th {
  width: 110px;
  padding-right: 10px;
}
.settings-edit-table input {
  width: 388px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  color: #808080;
  font: inherit;
  line-height: 17px;
  padding: 5px 10px;
}
<table class="settings-edit-table">
  <tbody>
    <tr>
      <th scope="row">Name</th>
      <td>
        <input name="firstName" id="firstName" value="test" type="text">
      </td>
    </tr>

    <tr>
      <th scope="row">Surname</th>
      <td>
        <input name="lastName" id="lastName" value="test" type="text">
      </td>
    </tr>



    <tr>
      <th scope="row">Phone</th>
      <td>
        <input name="phone" id="phone" value="6666666" type="text">
      </td>
    </tr>

    <tr>
      <th scope="row">E-mail</th>
      <td>
        <input name="email" id="email" value="test@gmail.com" type="email">
      </td>
    </tr>


  </tbody>
</table>

对于行名称,文本对齐是左对齐的,在 Chrome 和 Firefox 中一切正常。由于某些原因,在 Internet Explorer 中文本对齐居中。有什么建议可以解决这个问题吗?这里也是 fiddle link

最佳答案

添加此属性

.settings-edit-table th{text-align:left}

关于html - IE更改中的文本对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32582126/

相关文章:

html - 来自远程系统的实时可视化(OutSide LAN)

html - 输入栏横放时如何均匀设置输入框宽度?

javascript - 在发布表单之前在输入文本框中显示日期?

css - 如何交换两个 CSS 变量的值?

php - 如何使用php将一列的单行中的多个值添加到mysql中

html - 如何将 div 对齐到图片的边缘?

html - 如何将表格中的列向左移动?

html - CSS Center(行高垂直,页面水平)Div的

javascript - 使div按顺序倒退

html - 如何将单选按钮包装在导轨标签内