<FORM> tag *sometimes* throws carriage return... How do I make HTML code look the same in Netsape &

S

Shiperton Henethe

Hi

It seems that the <FORM> tag throws a carriage return in MSIE (6),
but not in Netscape (7.1).

What is the best way to get HTML code to look the same in both
Netscape and MSIE?

Is it incorrect nesting to put the <FORM> tag between a <TABLE>and
a <TR> tag?

e.g. something like this:

<TABLE>

<FORM ...>

<TR>
<TD>
..
..
</TD>
</TR>

</FORM>
</TABLE>

With thanks


Ship
Shiperton Henethe
 
S

SpaceGirl

Shiperton said:
Hi

It seems that the <FORM> tag throws a carriage return in MSIE (6),
but not in Netscape (7.1).

What is the best way to get HTML code to look the same in both
Netscape and MSIE?

Is it incorrect nesting to put the <FORM> tag between a <TABLE>and
a <TR> tag?

e.g. something like this:

<TABLE>

<FORM ...>

<TR>
<TD>
.
.
</TD>
</TR>

</FORM>
</TABLE>

With thanks


Ship
Shiperton Henethe


<form style="margin-bottom:0px" ...>

That's the fix for IE. For some reason IE sticks a margin in at the
bottom of forms. Other browsers dont.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
P

Philip Ronan

Shiperton said:
Is it incorrect nesting to put the <FORM> tag between a <TABLE>and
a <TR> tag?

Yes

A <FORM> element can contain block level elements only. So put the table
inside the form like this

<FORM ... >
<TABLE ... >
...
</TABLE>
</FORM>
 
D

Danny

Shiperton said:
Hi

It seems that the <FORM> tag throws a carriage return in MSIE (6),
but not in Netscape (7.1).

What is the best way to get HTML code to look the same in both
Netscape and MSIE?

Put this in the head of the doc:

<style type="text/css">
<!--
form {margin: 0px;}
-->
</style>
 
B

Beauregard T. Shagnasty

Danny said:
Put this in the head of the doc:

<style type="text/css">
<!--
form {margin: 0px;}
-->
</style>

Don't use the <!-- comment --> tags, and you don't need units if the
value is zero.

<style type="text/css">
form { margin: 0; }
</style>
 
D

Danny

Beauregard T. Shagnasty wrote:

Don't use the <!-- comment --> tags, and you don't need units if the
value is zero.

<style type="text/css">
form { margin: 0; }
</style>

Thanks Beau,

I suppose that's better than my suggestion. Out of curiosity: why not
the comment tags?
 
N

Neal

Danny said:
Out of curiosity: why not the comment tags?

They were employed to hide the CSS from old browsers which are not used in
any appreciable number today. As such, since it was originally a
non-standard hack, it should be abandoned.
 
D

Danny

Neal said:
They were employed to hide the CSS from old browsers which are not used
in any appreciable number today. As such, since it was originally a
non-standard hack, it should be abandoned.

OK, so they're harmless but a sore to a coder's eye. Thanks.
 
B

Barbara de Zoete

OK, so they're harmless but a sore to a coder's eye. Thanks.

They are not really harmless. Yes, in html they seem harmless enough, but
once you have learned to use them as a bad habit, you will not understand
why your styles don't get applied to your xml pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top