0

Есть таблица, на предпоследней строке 3 ячейки, на последней 2: фото. Подскажите пожалуйста, как мне сделать выравнивание последней строки по центру, но чтобы все формочки остались в левой части каждой из двух ячеек?

<table cellpadding="5">
  <tbody>
    <tr>
      <!-- таких 3 -->
      <td colspan=2>
        <form name="${dayName}" method="post">
          <input type="hidden" name="_method" value="put">
          <center><label><h4>${dayName}</h4></label></center>
          <br><label>Date <input type="date" name="date" required readonly value="${date}"></label>
          <br><label>Time <input type="time" name="time" required value="${time}"</label>
          <br><label>Subject
                <br><input type="text" name="subject" size="53" required value="${subject}">
            </label>
          <br><label>Message
                <br><textarea rows="12" cols="55" name="message" required>${text}</textarea>
            </label>
          <br>
          <center>
            <input type="hidden" name="_csrf" value="${_csrf.token}" />
            <button type="reset" class="btn btn-outline-primary">Reset</button>
            <button type="submit" class="btn btn-outline-primary">Submit</button>
            <br><br>
          </center>
        </form>
      </td>
    </tr>
    <tr>
      <!-- таких 2 -->
      <td colspan=3>
        <form name="${dayName}" method="post">
          <input type="hidden" name="_method" value="put">
          <center><label><h4>${dayName}</h4></label></center>
          <br><label>Date <input type="date" name="date" required readonly value="${date}"></label>
          <br><label>Time <input type="time" name="time" required value="${time}"</label>
          <br><label>Subject
                <br><input type="text" name="subject" size="53" required value="${subject}">
            </label>
          <br><label>Message
                <br><textarea rows="12" cols="55" name="message" required>${text}</textarea>
            </label>
          <br>
          <center>
            <input type="hidden" name="_csrf" value="${_csrf.token}" />
            <button type="reset" class="btn btn-outline-primary">Reset</button>
            <button type="submit" class="btn btn-outline-primary">Submit</button>
            <br><br>
          </center>
        </form>
      </td>
    </tr>
  </tbody>
</table>

1
  • Возможно, я немного непонятно объяснил. Мне бы хотелось, чтобы все было симметрично в таблице. Может быть у Вас есть идеи, как это реализовать?
    – user316215
    17 ноя 2018 в 9:15

1 ответ 1

0

А не легче через flexbox или display: inline-block, если нужна поддержка в IE? Просто таблицы - устаревшая и совершенно неподдающаяся адаптации на мобильных устройствах технология.

1
  • Спасибо, посмотрю.
    – user316215
    17 ноя 2018 в 12:04

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.