Solved

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

Posted on 2011-03-03
4
295 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
4 Comments
 
LVL 40

Expert Comment

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

Accepted Solution

by:
chilternPC earned 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
two div layout one vertical other horizontal. 5 24
css issues with IE 11 8 33
Input box gone wrong 8 24
"Pause" execution of javascript function for x miliseconds 2 23
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

785 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