Forum Moderators: not2easy
1) A input box on the left and 0-many buttons on the right
2) The whole thing to take up 100% width of the container (which itself is a flexible width)
3) The input to flex to fill the gap left by the buttons
4) No tables for layout :)
The HTML is flexible, but will probably look something like:
<div>
<input type="text" />
<a href="#">Button 1</a>
<a href="#">Button 2</a>
</div> So, thoughts? I'm going to play around with this for the next couple of hours - if I come up with anything I'll reply back.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Untitled</title>
<style type="text/css" media="screen">
.row {background: #dad; overflow: auto; display: -moz-box;}
input {float: left; margin: 0 5px; -moz-box-flex: 1;}
a {display: block; float: right; padding: 0 5px; border: 1px solid #000;}
</style>
</head>
<body>
<div class="row">
<input type="text" />
<a href="#">Button 1</a>
<a href="#">Button 2</a>
</div>
</body>
</html>
<div>
<div><input /></div>
<div><a></a></div>
</div> div { display: table; }
div>div { display: table-cell; width: 30px; }
div>div:first-child, input { width: 100%; } should do basically what I'm trying to achieve (I think). Of course, then we're back to IE7 not working!