Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Form-Tag influences table layout

3 views
Skip to first unread message

Magnus Warker

unread,
Dec 18, 2006, 12:23:34 PM12/18/06
to
Hi group!

I know that HTML output is not as predictable as sometimes desired, but let
me ask a question.

The following HTML code produces a rectangle that covers the entire client
area of a web browser (table with width/height='100%').

Within this rectangle there is another rectangle, and it is desired that
this inner rectangle covers the entire area of the outer rectangle (another
table with width/height='100%').

This works as long as the inner table is not surrounded by a form tag.
Remove the form tags of the following code and it works. Leave them and the
inner rectangle's "height='100%' seems to be ignored.

This means that as soon as you insert the form tags, the height of the inner
form is redefined.

Are there any tricks to deal with this behavior? If you wonder for what it
would be good: There's a list of application data and a command bar (e. g.
'create', 'delete' etc.). The list should begin at the top, but the command
bar should always be at the bottom of the screen. I used to use the
"valign=bottom" tag for this, but this is useless, when the whole form does
not cover the whole height of the scene.

Thanks a lot,
Magnus

------

<html>
<body>

<table border='1' width='100%' height='100%'>
<tr>
<td align='center'>

<form action='/myservice' method='post'>

<table border='1' width='100%' height='100%'>
<tr>
<td align='center'>
XXX
</td>
</tr>
</table>

</form>

</td>
</tr>
</table>

</body>
</html>

Harlan Messinger

unread,
Dec 18, 2006, 12:19:07 PM12/18/06
to
Magnus Warker wrote:
> Hi group!
>
> I know that HTML output is not as predictable as sometimes desired, but let
> me ask a question.
>
> The following HTML code produces a rectangle that covers the entire client
> area of a web browser (table with width/height='100%').
>
> Within this rectangle there is another rectangle, and it is desired that
> this inner rectangle covers the entire area of the outer rectangle (another
> table with width/height='100%').
>
> This works as long as the inner table is not surrounded by a form tag.
> Remove the form tags of the following code and it works. Leave them and the
> inner rectangle's "height='100%' seems to be ignored.

Ignored? Are you sure it isn't being set to 100% of the size of the
form, which itself has no specified size?


>
> This means that as soon as you insert the form tags, the height of the inner
> form is redefined.

Inner form? You can't have a form inside another form. You were talking
about an outer form before.


>
> Are there any tricks to deal with this behavior? If you wonder for what it
> would be good: There's a list of application data and a command bar (e. g.
> 'create', 'delete' etc.). The list should begin at the top, but the command
> bar should always be at the bottom of the screen. I used to use the
> "valign=bottom" tag for this, but this is useless, when the whole form does
> not cover the whole height of the scene.

Don't use the width and height attributes at all. Use CSS, and set width
and height to 100% for each of the successively nested elements.

Magnus Warker

unread,
Dec 18, 2006, 12:39:05 PM12/18/06
to
Dear Harlan!

>> This works as long as the inner table is not surrounded by a form tag.
>> Remove the form tags of the following code and it works. Leave them and
>> the inner rectangle's "height='100%' seems to be ignored.
>
> Ignored? Are you sure it isn't being set to 100% of the size of the
> form, which itself has no specified size?

Interesting! Can I define the height of a form??? And: Why should the width
still be 100%?

>> This means that as soon as you insert the form tags, the height of the
>> inner form is redefined.
> Inner form? You can't have a form inside another form. You were talking
> about an outer form before.

Sorry, a mistake! I meant the inner table, not the inner form.

>> Are there any tricks to deal with this behavior? If you wonder for what
>> it would be good: There's a list of application data and a command bar
>> (e. g. 'create', 'delete' etc.). The list should begin at the top, but
>> the command bar should always be at the bottom of the screen. I used to
>> use the "valign=bottom" tag for this, but this is useless, when the whole
>> form does not cover the whole height of the scene.
>
> Don't use the width and height attributes at all. Use CSS, and set width
> and height to 100% for each of the successively nested elements.

So no chance with plain HTML?

Magnus

Harlan Messinger

unread,
Dec 18, 2006, 12:51:59 PM12/18/06
to
Magnus Warker wrote:
> Dear Harlan!
>
>>> This works as long as the inner table is not surrounded by a form tag.
>>> Remove the form tags of the following code and it works. Leave them and
>>> the inner rectangle's "height='100%' seems to be ignored.
>> Ignored? Are you sure it isn't being set to 100% of the size of the
>> form, which itself has no specified size?
>
> Interesting! Can I define the height of a form??? And: Why should the width
> still be 100%?

Because the default width of block elements other than tables is
ordinarily 100%.

>
>>> This means that as soon as you insert the form tags, the height of the
>>> inner form is redefined.
>> Inner form? You can't have a form inside another form. You were talking
>> about an outer form before.
>
> Sorry, a mistake! I meant the inner table, not the inner form.
>
>>> Are there any tricks to deal with this behavior? If you wonder for what
>>> it would be good: There's a list of application data and a command bar
>>> (e. g. 'create', 'delete' etc.). The list should begin at the top, but
>>> the command bar should always be at the bottom of the screen. I used to
>>> use the "valign=bottom" tag for this, but this is useless, when the whole
>>> form does not cover the whole height of the scene.
>> Don't use the width and height attributes at all. Use CSS, and set width
>> and height to 100% for each of the successively nested elements.
>
> So no chance with plain HTML?

No, and you shouldn't use plain HTML to style the presentation anyway.
The HTML attributes that do exist for presentation are a legacy of a
turn down a wrong direction that was reversed years ago.

Magnus Warker

unread,
Dec 18, 2006, 1:12:22 PM12/18/06
to
Hi Harlan!

>> Interesting! Can I define the height of a form??? And: Why should the
>> width still be 100%?
> Because the default width of block elements other than tables is
> ordinarily 100%.

What about the first question? Can I define the height of a form?

>> So no chance with plain HTML?
> No, and you shouldn't use plain HTML to style the presentation anyway.

How could I minimalistically set the height of a form with CSS?

> The HTML attributes that do exist for presentation are a legacy of a
> turn down a wrong direction that was reversed years ago.

Well, the reason why I would prefer non-CSS-layouts is some years ago.
Netscape had a bug that, when disabled JavaScript also disabled CSS. And JS
was disabled within that environment (e. g. filtered by a firewall).

Magnus

David Dorward

unread,
Dec 18, 2006, 2:01:20 PM12/18/06
to
Magnus Warker wrote:

> Well, the reason why I would prefer non-CSS-layouts is some years ago.
> Netscape had a bug that, when disabled JavaScript also disabled CSS. And
> JS was disabled within that environment (e. g. filtered by a firewall).

Netscape 4.x supported CSS by means of an emulation layer on top of its JSSS
engine (which, in turn, depending on JavaScript). There should be no need
to worry about Netscape 4.x on today's web. Its been superceeded and
unsupported for a very long time.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

Harlan Messinger

unread,
Dec 18, 2006, 4:48:15 PM12/18/06
to
Magnus Warker wrote:
> Hi Harlan!
>
>>> Interesting! Can I define the height of a form??? And: Why should the
>>> width still be 100%?
>> Because the default width of block elements other than tables is
>> ordinarily 100%.
>
> What about the first question? Can I define the height of a form?

You can't define the height or width of forms in HTML.

>
>>> So no chance with plain HTML?
>> No, and you shouldn't use plain HTML to style the presentation anyway.
>
> How could I minimalistically set the height of a form with CSS?

width: 100%; height: 100%;

>> The HTML attributes that do exist for presentation are a legacy of a
>> turn down a wrong direction that was reversed years ago.
>
> Well, the reason why I would prefer non-CSS-layouts is some years ago.
> Netscape had a bug that, when disabled JavaScript also disabled CSS. And JS
> was disabled within that environment (e. g. filtered by a firewall).

That's like typing your documents in Notepad because WordPerfect 6.0 was
terribly buggy in 1993. I assume you're talking about Netscape 4.x or
maybe 6.0; version 6.2 is already more than five years old. In the
computer world, that's ancient history. Support for CSS today is
universal in all graphical browsers that significant numbers of people
use, bugs and gaps in support for a few features notwithstanding, and
it's what skilled developers use to format web pages.

Jukka K. Korpela

unread,
Dec 18, 2006, 6:19:53 PM12/18/06
to
Scripsit David Dorward:

> Magnus Warker wrote:
>
>> Well, the reason why I would prefer non-CSS-layouts is some years
>> ago. Netscape had a bug that, when disabled JavaScript also disabled
>> CSS. And JS was disabled within that environment (e. g. filtered by
>> a firewall).
>
> Netscape 4.x supported CSS by means of an emulation layer on top of
> its JSSS engine (which, in turn, depending on JavaScript). There
> should be no need to worry about Netscape 4.x on today's web. Its
> been superceeded and unsupported for a very long time.

I agree with the conclusion, but not with the arguments.

There's nothing particularly wrong with Netscape 4 (or Internet Explorer 3
for that matter), if you use it cleverly and use the best part of its CSS
support: the ease of turning it off. Of course, this only applies if you are
mostly interested in the _content_ of web pages and in no-nonsense pages.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Magnus Warker

unread,
Dec 19, 2006, 12:35:12 PM12/19/06
to
Dear Harlan,

thank you for your opinion. I think you're right.

Well, I worked about 7 years behind the firewall of a hospital, and these
firewalls are very restrictive. From the outside world, people say that
these firewalls are paranoid. But from the inside, after a while, you begin
to get a very bad opinion on web sites that doesn't work in this situation.
As a result, I restricted myself to plain HTML. But now I have another
job... :-)

Magnus

TreeNet Webmaster

unread,
Dec 23, 2006, 4:29:33 AM12/23/06
to
In article <em97s6$t75$1...@online.de>, mag...@warker.co says...

> Dear Harlan,
>
> thank you for your opinion. I think you're right.
>
> Well, I worked about 7 years behind the firewall of a hospital, and these
> firewalls are very restrictive. From the outside world, people say that
> these firewalls are paranoid. But from the inside, after a while, you begin
> to get a very bad opinion on web sites that doesn't work in this situation.
> As a result, I restricted myself to plain HTML. But now I have another
> job... :-)
>
> Magnus
>
>

Just to add my 2cents as a fellow coder having been in a similar
situation to the one you describe not too may years ago.

Absolutely, check out all the documentation to you can on HTML4.01
Strict and how to use CSS with it. You will not regret the boost it
gives your code.

There are some major ideas in peoples differing views of what 'plain'
html are, that themselves are the root cause of display problems with
current-world web pages. I delayed the self-update and have regretted it
ever since.

AJ

maxonlin...@gmail.com

unread,
Dec 24, 2006, 4:53:26 AM12/24/06
to
Welcome to MAX web Solution's Website, a full service affordable
offshore web site design, Search Engine marketing and web development
company based in Kathmandu. We focus on e business solutions at low
prices serving the needs of small to medium businesses all over the
world. We offer a wide range of custom web site design development and
seo services at affordable prices starting from small presentation
sites to complex multifunctional web portals and advanced custom
e-commerce business solutions.
Service is everything - your satisfaction is guaranteed
That is why we would gladly accept the responsibility of taking care of
your site. We want to save your time, so that you could devote yourself
to the most important thing - your business. Allow us to maintain and
support your web site.
Money back guarantee
A 30 Day money back guarantee for the first monthly fee.
You can also response to this message.

Fillup the below information for further inquarry.
Contact Name :
Organization Name:
E-mail Address :
Phone no:
Call us for Demostration
Call : 2390177 / 9841206820
Check it out for more information
http://www.max-online.biz/idevaffiliate/idevaffiliate.php?id=749

0 new messages