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

Form-Tag influences table layout

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>
Dec 18 '06 #1
10 2785
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.
Dec 18 '06 #2
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
Dec 18 '06 #3
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.
Dec 18 '06 #4
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
Dec 18 '06 #5
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
Dec 18 '06 #6
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.
Dec 18 '06 #7
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/

Dec 18 '06 #8
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

Harlan Messinger wrote:
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.
Dec 19 '06 #9
In article <em**********@online.de>, ma****@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
Dec 23 '06 #10
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/idevaffili...ate.php?id=749

Dec 24 '06 #11

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
4
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the...
19
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
5
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
6
by: Gary Miller | last post by:
Does anyone know how to detect a modeless form on closing by the form that invoked the modeless form? form.Show();
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
6
NeoPa
by: NeoPa | last post by:
Introduction The first thing to understand about Sub-Forms is that, to add a form onto another form takes a special Subform control. This Subform control acts as a container for the form that you...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.