Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No line break?

Status
Not open for further replies.

JediDan

Programmer
May 15, 2002
128
US
Hello,

I'm trying to make a small horizontal navigation bar for the top of a page. Justifed left there will be 4 links, and I want a select box justified on the right hand side.

I can't get this working without a line break showing up between the links and the select box?

What can I do? Any HTML or CSS solutions are welcome.

Thanks
 
if you're putting <form> tags around the select, that could create the line break. The best solution is to put all of the fields into a table. Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048
Tek-Tips Best Practices: FAQ183-3179
 
JediDan,

Here's a sample to show you a simple HTML way of doing this:

Code:
<!DOCTYPE html 
     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
     &quot;[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>[/URL]

<html xmlns=&quot;[URL unfurl="true"]http://www.w3.org/1999/xhtml&quot;[/URL] xml:lang=&quot;en&quot; lang=&quot;en&quot;>
  <head>
    <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;></meta>
    <title>Sample layout</title>
  </head>
  <body>
    <form name=&quot;ThisForm&quot;>
      <table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; width=&quot;100%&quot;>
        <tr>
          <td align=&quot;left&quot;>link 1 * link 2 * link 3 * link 4</td><td align=&quot;right&quot;><select><option>link a</option><option>link b</option><option>link c</option><option>link d</option></select></td>
        </tr>
      </table>
      <hr />
    </form>
  </body>
</html>

Hope that helps!

Cheers,
[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Thanks all for the help... it was actually the
Code:
<form>
tags that were causing the problem. I've placed the whole business between the tags now and it seems to work.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top