I have a following layout. I want all the TD
s of equal width and extra space around them.
If I use float:left;
over TDs all get equally sized but then vertical-align: middle;
stops working.
Is there a way I can do it without using float:left;
?
<table class="student_table">
<tr>
<th class="class_box" colspan="4">Batch 2012</th>
</tr>
<tr class="batch_header">
<td> Hi </td> <!--Have to center this-->
<td> Hi </td>
<td> Hi </td>
<td> Hi </td>
</tr>
.batch_header{
width: 245px;
display: inline-block;
}
.batch_header td{
width:30px;
height:30px;
background-color:#EEE;
margin:0px;
padding:2.5px;
border:0px;
<!-- float:left; --> <!-- < equally sized with this but not vertically aligned is not working-->
font-weight: bold;
font-size: smaller;
text-align:center;
vertical-align: middle; <!-- < This is not working-->
}