Koes Bong Koes Bong - 11 months ago 84
HTML Question

rowspan and colspan not working in Chrome

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;">
<tr style="">
<td rowspan="3">
<a href="#">
<div style="height: 440px; width: 280px; background: #000;"></div>


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?

Answer Source

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 ton available, like Bootstrap and Foundation.