1

I have a code snippet that looks like something below. The full code can be seen here: http://codepen.io/anon/pen/VYbxbQ

<table style="display: inline-table; width: 1220px;">
  <tbody>
    <tr style="">
      <td rowspan="3">
        <a href="#">
          <div style="height: 440px; width: 280px; background: #000;"></div>
        </a>
      </td>

...

When loaded in Chrome, the layout doesn't look very tight. When loaded in Firefox, it looks tight and exactly how it should look like.

Any ideas?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Koes Bong
  • 1,113
  • 3
  • 15
  • 28

1 Answers1

2

You are mixing colspan/rowspans with defined widths and heights, which would make this layout very difficult to predict, as you are experiencing right now.

If you are doing this for layout purposes, I'd recommend against using tables. Check out this Stack Overflow question for more info.

Try using a grid layout. There are tons available, like Bootstrap and Foundation.

Sartaj
  • 108
  • 1
  • 1
  • 9