Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Strange Text alignment issue

    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.

    Code:
    <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>

  • #2
    New Coder
    Join Date
    Feb 2007
    Location
    Indianapolis, IN
    Posts
    35
    Thanks
    3
    Thanked 0 Times in 0 Posts
    How about putting the form into a div, with a set width and text-align everything right?

  • #3
    New Coder
    Join Date
    Oct 2007
    Posts
    23
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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?

  • #4
    New Coder
    Join Date
    Feb 2007
    Location
    Indianapolis, IN
    Posts
    35
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.

    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •