Solved

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

Posted on 2011-03-03
4
300 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:gurvinder372
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 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

635 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