|
Posted by Harlan Messinger on December 18, 2006, 12:51 pm
Please log in for more thread options
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.
|