Struggling with table cell paddings in Chrome because it appears that if a table cell doesn't have pure text, the padding isn't applied.
Here's my code:
<table>
<tr>
<th></th>
<th class="account-picture"></th>
<th class="account-name">Name</th>
<th class="account-email">Email</th>
<th class="account-last">Last Sign in</th>
</tr>
<tr>
<td>
<fieldset>
<ul>
<li><input type="checkbox" id="enabled" name="test[]" value="enabled"></li>
</ul>
</fieldset>
</td>
<td class="account-picture">
<div class="online">
<img src="http://www.genengnews.com/app_themes/genconnect/images/default_profile.jpg"> </div>
</td>
<td class="account-name">test test test test test test test test test test test test test test test test test test</td>
<td class="account-email">test test test test test test test test test test test test test test test test test test</td>
<td class="account-last">15 April 2012 10:19 AM</td>
</tr>
</table>
The CSS being used:
img{
height: 42px;
width: 42px;
}
td, th{
padding: 0 12px;
vertical-align: middle;
}
.account-picture{
width: 40px;
}
.account-name{
min-width: 100px;
}
.account-email{
min-width: 120px;
}
.account-last{
min-width: 140px;
}
table{
table-layout: fixed;
float: none;
width: 100%;
margin-top: 10px;
}
td, th{
word-wrap: break-word;
padding: 0 12px;
vertical-align: middle;
}
td:first-child, th:first-child{
width: 14px;
}
View the fiddle here: http://jsfiddle.net/5mPFk/1/
Rendering differs between browsers:
Firefox 11:
Chrome 18 (latest):
Internet Explorer 9:
While IE and FF display correctly, Chrome has issues. Any insights on why this happens and how to fix it?