473,231 Members | 1,598 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,231 software developers and data experts.

<form> without <p> break

HTMListas:

(Apologies for I can't Google for this - too many common words.)

I have a <form> tag.

It thinks I want a <p> break before and after the form. I don't. (My forms
are sneaky and inline.)

How do I avoid paragraph breaks around a <form> tag?

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #1
10 8905
Phlip wrote:
How do I avoid paragraph breaks around a <form> tag?


If you're referring to margins when you say "paragraph breaks", use this:

form {
margin : 0;
padding : 0;
}
Jul 23 '05 #2
On Sun, 07 Nov 2004 19:44:29 GMT, Phlip <ph*******@yahoo.com> wrote:
HTMListas:

(Apologies for I can't Google for this - too many common words.)

I have a <form> tag.

It thinks I want a <p> break before and after the form. I don't. (My
forms
are sneaky and inline.)

How do I avoid paragraph breaks around a <form> tag?


The break you see is not really a <p> break, though it is related.

Some block elements (the ones which aren't inline, or which don't occur in
the flow of the text but stand alone) have marging and/or padding which
make other elements have to be a distance away from them when rendered on
screen.

p and form are two such elements. So what you need is to use CSS to
eliminate the margin on the form. Possibly, a neighboring element will
also have a margin, though, so you might have to adjust it too.
Jul 23 '05 #3
Leif K-Brooks wrote:
Phlip wrote:

How do I avoid paragraph breaks around a <form> tag?


If you're referring to margins when you say "paragraph breaks", use this:

form {
margin : 0;
padding : 0;
}


Okay, that leads to this:

yo:<form style="margin:0;padding:0"><input type="edit"></form>

That's giving me this:

yo:
[ ]

Without the 0 padding stuff, there would be the moral equivalent of a <p/>
between the yo: and the <form>. However, now there is the moral equivalent
of a <br/>.

Thanks for the tip, and I will use it to reduce the blank spaces around some
other forms. However, I still have a form that I don't want a break before.
I need to learn to insert tiny forms inline among text.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #4
On Sun, 07 Nov 2004 20:06:50 GMT, Phlip <ph*******@yahoo.com> wrote:
Leif K-Brooks wrote:
Phlip wrote:

> How do I avoid paragraph breaks around a <form> tag?


If you're referring to margins when you say "paragraph breaks", use
this:

form {
margin : 0;
padding : 0;
}


Okay, that leads to this:

yo:<form style="margin:0;padding:0"><input type="edit"></form>

That's giving me this:

yo:
[ ]

Without the 0 padding stuff, there would be the moral equivalent of a
<p/>
between the yo: and the <form>. However, now there is the moral
equivalent
of a <br/>.


Right. That's because form is inherently block. Try this:

yo:<form style="margin:0;padding:0;display:inline;"><input
type="edit"></form>
Jul 23 '05 #5
Neal wrote:
yo:<form style="margin:0;padding:0;display:inline;"><input
type="edit"></form>


yo:[ ]

Yes! Thanks.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces

Jul 23 '05 #6
On Sun, 07 Nov 2004 20:21:19 GMT, Phlip <ph*******@yahoo.com> wrote:
Neal wrote:
yo:<form style="margin:0;padding:0;display:inline;"><input
type="edit"></form>

Yes! Thanks.


Actually, you should be able to dump the margin:0;padding:0; now.

Jul 23 '05 #7
Neal <ne*****@yahoo.com> wrote:
On Sun, 07 Nov 2004 20:21:19 GMT, Phlip <ph*******@yahoo.com> wrote:
Neal wrote:
yo:<form style="margin:0;padding:0;display:inline;"><input
type="edit"></form>

Yes! Thanks.


Actually, you should be able to dump the margin:0;padding:0; now.


Also, this won't work in Strict HTML because a form can only contain
block elements. So then you'd really need something like

form * { display: inline; }

in a stylesheet.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 23 '05 #8
"Phlip" <ph*******@yahoo.com> wrote in
comp.infosystems.www.authoring.html:
I have a <form> tag.

It thinks I want a <p> break before and after the form. I don't. (My forms
are sneaky and inline.)
Not quite -- it thinks that <form> is a block element, like <p>
How do I avoid paragraph breaks around a <form> tag?


Style sheets are the way; you can't do it in pure HTML. It's well
worth your time to learn CSS style sheets -- see some tutorials at
http://oakroadsystems.com/tech/webau...m#TutorialsCSS -- but for
something quick and dirty change
<form
to
<form style="display:inline"

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 23 '05 #9
Harlan Messinger wrote:
Also, this won't work in Strict HTML because a form can only contain
block elements. So then you'd really need something like

form * { display: inline; }

in a stylesheet.


In terms of being confused for a newbie born after HTML was invented...

....now would probably not be a good time to say "But Internet Explorer likes
style='display:inline', so I'l stick with that."

It's for an in-house project, guys.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #10

Phlip wrote (in part):
Okay, that leads to this:

yo:<form style="margin:0;padding:0"><input type="edit"></form>

That's giving me this:

yo:
[ ]


Try:

yo:<form style="margin:0;padding:0;display:inline"><input
type="edit"></form>

That should give you "yo:[ ]".

Ken

Jul 23 '05 #11

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

Similar topics

2
by: Kai Grossjohann | last post by:
The following HTML file invoker.html creates a modal dialog: <html><head> <script language="JavaScript"> function popup() { window.showModalDialog("main.html", null,...
14
by: Ian Rastall | last post by:
I'm curious as to the group's feelings about using the <fieldset> and <legend> tags around elements other than <form> elements ... I wrote a small test file:...
129
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
1
by: Hai Nguyen | last post by:
Hi all I have a several User Controls which require this tag: "<form runat="server">. I tried to have all of these user user controls on the same web page. It kept giving me an error :""A page...
4
by: George | last post by:
I'm using .NET framework 1.1 and VS.NET 2003 for a aspx web form. There is a DropDwonList on the page and its SelectedIndexChanged event is fired to the server normally, until when I add another...
4
by: Kevin Blount | last post by:
bit long winded this one, so stick with me: I'm trying to create a form that can go to one of 3 places, depending on various elements. My form control looks like this: <form runat="server"...
4
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image...
1
by: mark4asp | last post by:
<form runat="server"automatically adds <divtag to code contained within. Is there a way to stop that? Mixing block-level elements with inline-level elements messes up the HTML becasuse that is...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.