Friday, July 6, 2012

aligning divs, form fields, and text with CSS

<div style='width:400px; height:40px;'>
   <div style='width:198px; height:40px; float: left;'>
      <input value='foo' style='width:100px; float:right; text-align: right;' />
   </div>
   <div style='width:198px; height:40px; float: right;'>
      <input value='bar' style='width:100px; float:left;' />
   </div>
</div>
<div style='width:400px; height:40px; text-align: center;'>
   <input value='baz' style='width:100px; text-align: center;' />
</div>

...makes...

No comments:

Post a Comment