Thu, 2004-10-21 16:19
I am trying to align a text box and a button so that they are on the same line, but the button keeps going to the next line. The code looks like this:
<input type="text" size="10" class="textbox" />
<input type="button" value="OK" class="submit" style="float: right;"/>
Any ideas?
Thu, 2004-10-21 16:21
#1
Align form elements
putting like this
<input type="text" size="10" class="textbox" /> <input type="button" value="OK" class="submit" />
it should stay on the same line!?
Thu, 2004-10-21 17:00
#2
Align form elements
Got it, thanks. There was a <DIV> around it that was not wide enough to let it stay on one line.
Thu, 2004-10-21 17:00
#3
Align form elements
Hi Alex:
When you float an element, it means that subsequent elements will use any unused space around it. If you don't want them inline as in karinne's post, try floating the first element rather than the second one.