O
O
Oleg2014-05-07 13:09:07
css
Oleg, 2014-05-07 13:09:07

Table bug in FireFox and IE (under WinPhone). Table extends beyond parent even though size is set as a percentage

There is a site: namaxdesign.ru
The table "Why you should work with us" (almost at the top of the page) moves out of the parent (div max-width: 800px;) in the FireFox 29 browser and in IE under Windows Phone.
9803468151f047df9a7e189413860186.jpg
In Chrome, IE11, Safari, Opera, this problem is not observed
Problematic HTML code (simplified for clarity):

<div class="container">
  <h1>Почему</h1>
  <div class="align-left block-800">
    <table class="four_four">
      <tr>
        <td>
          <img src="/images/image-plus-1.jpg" />
          <div class="name">Оптимальные цены</div>
        </td>
        <td>
          <img src="/images/image-plus-2.jpg" />
          <div class="name">Готовый дизайн</div>
        </td>
      </tr>
      <tr>
        <td>
          <img src="/images/image-plus-5.jpg" />
          <div class="name">Наши проекты</div>
        </td>
        <td>
          <img src="/images/image-plus-7.jpg" alt="" />
          <div class="name">Команда профессионалов</div>
        </td>
      </tr>
    </table>
  </div>
</div>

.container {
  margin: 0 auto;
  width: 96%;
  padding: 0 2%;
  box-sizing: border-box;
  position: relative;
}

.block-800 {
  max-width: 800px;
  margin: 0 auto;
}

table.four_four {
  width: 100%;
}

table.four_four td {
  width: 25%;
  padding: 15px 2% 40px;
  box-sizing: border-box;
  vertical-align: top;
}

table.four_four td img {
  height: auto;
  border-radius: 50%;
  max-width: 80%;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lnked, 2014-05-07
@Dok11

table.four_four {
    width: 100%;
    table-layout: fixed;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question