473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Button on the same line.

Hello,

I would like to create a button which should be put in the end of a
sentence (on the same line). I do like this:

<html>
This is my sentence.
<form action=file.php>
<input type=\"submit\" value=\"Yes\">
</form>
</html>

However, in this case button is put on next line. Can it be solved?

Jul 24 '05 #1
7 15310
op*********@yahoo.com wrote:
Hello,

I would like to create a button which should be put in the end of a
sentence (on the same line). I do like this:

<html>
This is my sentence.
<form action=file.php>
<input type=\"submit\" value=\"Yes\">
</form>
</html>

However, in this case button is put on next line. Can it be solved?


<form action="file.php">
This is my sentence.
<input type="submit" value="Yes">
</form>

Jul 24 '05 #2
"twaddle" <tw*****@gmail.com> wrote:
op*********@yahoo.com wrote:
Hello,

I would like to create a button which should be put in the end of a
sentence (on the same line). I do like this:
-snip- <form action="file.php">
This is my sentence.
<input type="submit" value="Yes">
</form>


That's one way of doing it, but it seems like it might confusing. Is there
a more generic wayf, possibly using CSS?

I know that in IE6, using <form action="file.php" style="display: inline;">
would cause it stay on the same line, but it won't in Firefox.

Although <form style="display: inline;"> </form> Sentence WILL work...

Hmn, I think I just found a slightly less confusing way to do it, although
it's more code...

<div style="display: inline;">
This is my sentence.
<form action="file.php">
<input type="submit" value="Yes">
</form>
</div>

Causes both Firefox and IE to display it inline...but isn't this a bug in
FireFox?

--
J.B.Moreno
Jul 24 '05 #3
J. B. Moreno <pl***@newsreaders.com> wrote:
I know that in IE6, using <form action="file.php" style="display: inline;">
would cause it stay on the same line, but it won't in Firefox.
If the preceding content is a paragraph, then the <form> tag closes the
paragraph element. If you style the form to display inline, then it's
essentially the same as

<p>Lorem ipsum...</p><span>form styled to display inline</span>

I'd say that Firefox is getting it right.
Hmn, I think I just found a slightly less confusing way to do it, although
it's more code...

<div style="display: inline;">
This is my sentence.
<form action="file.php">
<input type="submit" value="Yes">
</form>
</div>

Causes both Firefox and IE to display it inline...but isn't this a bug in
FireFox?


Not at all. The <form> tag doesn't close the div element. It does close the
paragraph element.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"The early bird gets the worm, but the second mouse gets the cheese."
Jul 24 '05 #4
In article <20*******************@newsreader.com>, J. B. Moreno writes:
op*********@yahoo.com wrote:
> I would like to create a button which should be put in the end of a
> sentence (on the same line). I do like this:

-snip-
<form action="file.php">
This is my sentence.
<input type="submit" value="Yes">
</form>


That's one way of doing it, but it seems like it might confusing.


It seems logical to me. Presumably, the desire to have the button and
the sentence on the same line arises from the fact that they're closely
related. Assuming that they are, having the sentence in the form seems
like the right structural markup -- even if it's later decided to put
them on different lines.

--
Michael F. Stemper
#include <Standard_Disclaimer>
Build a man a fire, and you warm him for a day. Set him on fire,
and you warm him for a lifetime.

Jul 24 '05 #5
Darin McGrew <mc****@stanfordalumni.org> wrote:
J. B. Moreno <pl***@newsreaders.com> wrote:
I know that in IE6, using <form action="file.php" style="display:
inline;"> would cause it stay on the same line, but it won't in
Firefox.
If the preceding content is a paragraph, then the <form> tag closes the
paragraph element. If you style the form to display inline, then it's
essentially the same as

<p>Lorem ipsum...</p><span>form styled to display inline</span>


Thanks, I'd just figured this out on my own....I was thinking of reporting
it as a bug, and was reducing it to the bare essentials, when lo and
behold, Firefox wasn't doing it anymore -- I'd deleted the <p> </p> tags.
I'd say that Firefox is getting it right.


Yeah, I guess so. Although I think that IE's behavior is better...at least
in this one narrow manner.

--
J.B.Moreno
Jul 24 '05 #6
ms******@siemens-emis.com (Michael Stemper) wrote:
J. B. Moreno writes:
op*********@yahoo.com wrote: -snip- <form action="file.php">
This is my sentence.
<input type="submit" value="Yes">
</form>


That's one way of doing it, but it seems like it might confusing.


It seems logical to me. Presumably, the desire to have the button and
the sentence on the same line arises from the fact that they're closely
related.


If it was a single sentence, that's one thing, but if it's buried within a
paragraph, then IMO it's going to seem strange and confusing, particularly
if it's a long paragraph.

--
J.B.Moreno
Jul 24 '05 #7
J.B.Moreno wrote:
If it was a single sentence, that's one thing, but if it's
buried within a paragraph, then IMO it's going to seem
strange and confusing, particularly if it's a long
paragraph.


Well, you can't have a form in a paragraph. But if you have a para, or
any other block level element, before the form you have to make them
both display inline to accomplish what you want.

<p style="display:inline">This is my sentence.</p>
<form action="..." style="display:inline">
<input type="submit" value="Yes">
</form>.

Jul 24 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: C. Alexander | last post by:
I'm making a 'whiteboard' application. I'm trying to have 2+ connected users able to draw at the same time. However, if User1 draws a line, when User2 is drawing, on User1 screen, it will draw...
1
by: Dennis | last post by:
I started a new thread because i cant reply on the older one. Thank you very much Rick for the usefull reply. But i'v got another question. When drawing the line, you cant see the line untill you...
3
by: Chris L | last post by:
Greetings, I searched for this possibility without finding very much. It might be too simple ? In the simplest of terms, I need to place a button on a form, and have it advance the number in a...
1
by: VMI | last post by:
In my Windows app, if I'm in a multi-line textbox and I'm writing a postal address (ie. write ist line and press <Enter>, write 2nd line and press <Enter>, etc...) how can I make sure that the...
3
by: ScooterMX | last post by:
I just have a function that does some sql stuff. When I run this I get an object expected error on the <input type="button"... line Does anyone have a suggestion? This is written for IE only -...
4
by: Alan Wang | last post by:
Hi there, I am having a problem with my asp.net web pages. If user hit BACK button on IE and then click some other web controls on the web page. the page goes to blank page. Anyone has the...
3
by: Randall Parker | last post by:
I have this element in an asp:DataGrid: <asp:TemplateColumn HeaderText="Edit Record Button"> <ItemTemplate> <asp:Button ID='<%# "Edit" + DataBinder.Eval(Container, "DataItem.owner_serial_num")...
5
by: Tina | last post by:
the Edit, Update, Cancel, and Delete buttons in my datagrid are causing validation elsewhere on the page. I want to specify that these buttons should not cause validation but they have no design...
3
by: mailto.anand.hariharan | last post by:
Hello group. This is my first message in this group, and my first stab at Javascript. I am trying to tweak the code for the "FOLDOC button" (http://foldoc.org/foldoc/tools.html) to be able to...
3
by: Donald A. Fisher | last post by:
Hello. I've been working a vb project and have a form with a button on it that performs some actions after disabling the button when clicked: Code disabling button and starting actions: Private...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.