I’m trying to create evenly sized CSS button links. I have 15 buttons arranged 3×5 in a table. They look great except the first column of buttons is wider than the other 2 because one of the buttons has a longer text.
The HTML:
<tr>
<td><a href=""><div class="btn">Flash</div></a></td>
<td><a href=""><div class="btn">Photoshop</div></a></td>
<td><a href=""><div class="btn">Fireworks</div></a></td>
</tr>
The CSS:
.btn {
width:100%;
padding: 3px 0px;
background-color: grey;
text-align: center;
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
border:1px solid black;
position:relative;
bottom:3px;
right:2px;
-webkit-box-shadow: 1px 2px black;
-moz-box-shadow: 1px 2px black;
box-shadow: 1px 2px black; }
Does anyone have a solution that will force all buttons to be the same size without fixing the width?
Just give your
tds a percentage width: