Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how do you place a form on the same line as other text

Posted on 2011-03-03
4
Medium Priority
?
303 Views
Last Modified: 2012-05-11
Hello Experts,

I have the following code:

<html>
<body>
<a>All on one line</a>
<form id="myform">
	<input type="text" name="test" size="20">
	<input type="submit" value="Submit" />
</form>
</body>
</html>

Open in new window


How do I place the form so that it appears on the same line as the 'All on one line' hyperlink?

Please note that I have several forms on the same page - but they should appear as the above (ie without the 'fix').

Many Thanks!
0
Comment
Question by:jagku
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 35028316
what exactly do you mean by <<place a form on the same line as other text>>?
0
 
LVL 29

Accepted Solution

by:
chilternPC earned 2000 total points
ID: 35028406
ususally use a table inside the form like so..

<form id="form1" name="form1" method="post" action="">
  <table width="500" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="94">some text</td>
      <td width="292"><input type="text" name="enter" id="enter" /></td>
      <td width="84"><input type="submit" name="Submit" id="Submit" value="Submit" /></td>
    </tr>
  </table>
</form>
0
 
LVL 2

Expert Comment

by:Michael Roodt
ID: 35028424
Perhaps you could use  position: absolute; and specify where on the page  you move it to.
0
 

Author Closing Comment

by:jagku
ID: 35069662
Hi,
Thanks - rereading my question - I must have been having a bad day! Yes, a table is fine - as well as prepending the text I want to appear to the left of the textbox.

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question