My goal is to create a layout similar to THIS, with 3 buttons aligned in a row - one on the left, one in the center, and one on the right. I want to achieve this using CSS and divs instead of tables.
I have managed to position the left and right buttons correctly using floats. However, I'm struggling to get the center button to stay inline with the other two without jumping out of the line.
Here's what I've attempted:
html:
<div class="left" ><input type="button" value="left" /></div>
<!--<div class="center" ><input type="button" value="center" /></div>-->
<div class="right" ><input type="button" value="right" /></div>
<!-- If I uncomment the center div, the right one appears in another block, below the others-->
css:
.left {
float:left;
}
.right {
float:right;
}
.center{
/*what do i put here??*/
}
I've created a fiddle here to demonstrate the issue.
Any suggestions on how I can achieve this layout and get as close as possible to the example with table layout?
Note: I've searched for similar questions but couldn't find any that address this exact problem.