...

View Full Version : Strange Text alignment issue



Juicy
10-11-2007, 09:08 PM
Hi, I am having a problem getting some text links aligned the way I need them. Essentially I want the link "More Options" to go directly underneath the "Options" link. Both of these links are after the submit button with the value search and should be on the same line as that button. The code "form {display:inline;}" does absolutely nothing for me.


<form id="form" action="search.php" method="get"><div><a href="/site"><img style="vertical-align: middle;" src="logo.jpg"></a>
<input type="text" name="q" size="30" maxlength="150" value="'.($q).'" title="Search">
<select name="options">
<option value ="File_Type">File Type</option>
</select>
<input type="submit" name="Submit" value="Search">
&nbsp;&nbsp;<a href=/>Options</a><br>&nbsp;&nbsp;<a href=/>More Options</a></div>
</form>

Brandt
10-11-2007, 09:13 PM
How about putting the form into a div, with a set width and text-align everything right?

Juicy
10-11-2007, 09:47 PM
Ok, so if I do that, I kind of get what I am looking for but there is too much space between the links. How do I make the bottom link appear directly below the top link so that they are nearly touching?

Brandt
10-11-2007, 10:24 PM
Try this. Used a container div, with two divs inside. One for the form elements, the other for the option links. You can play around with the widths because I have no idea how large that image really is.



<form id="form" action="search.php" method="get">
<div style="width: 550px">
<div style="width: 450px; float: left">
<a href="/site"><img style="vertical-align: middle;" src="logo.jpg"></a>
<input type="text" name="q" size="30" maxlength="150" value="'.($q).'" title="Search">
<select name="options">
<option value ="File_Type">File Type</option>
</select>
<input type="submit" name="Submit" value="Search">
</div>
<div style="float: right; width: 100px">
<a href=/>Options</a><br /><a href=/>More Options</a>
</div>
</div>
</form>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum