Solved

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

Posted on 2011-03-03
4
289 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
Comment Utility
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
Comment Utility
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
Comment Utility
Perhaps you could use  position: absolute; and specify where on the page  you move it to.
0
 

Author Closing Comment

by:jagku
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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!
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now