Closed
Bug 359802
Opened 18 years ago
Closed 18 years ago
positioning of form buttons in a table is faulty?
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: petko, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5
When a form starts inside table cell ( <td><form ...>....</td> ) valign attribute is not respected and text, fields or buttons are vertically aligned at the top. This is not observed in Mozilla 1.7.13.
Reproducible: Always
Steps to Reproduce:
different rendering of sample 1:
<html>
<head>
<title>test form</title>
</head>
<body>
<table width='90%' border='1' cellpadding='2'>
<tr>
<td align='center' valign='middle'>
<form method="post" action="/cgi-bin/test.pl">
a
</td>
</tr>
</table>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
and:
<html>
<head>
<title>test form</title>
</head>
<body>
<form method="post" action="/cgi-bin/test.pl">
<table width='90%' border='1' cellpadding='2'>
<tr>
<td align='center' valign='middle'>
a
</td>
</tr>
</table>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
Comment 1•18 years ago
|
||
> <td align='center' valign='middle'>
> <form method="post" action="/cgi-bin/test.pl">
> a
> </td>
1- The above implies improper nesting of elements. Elements must not overlap:
http://www.mozilla.org/docs/web-developer/upgrade_2.html#incorrectnesting
2- Note that forms usually have a top and bottom margins.
e.g.:
http://www.w3.org/TR/2006/WD-CSS21-20060411/sample.html
3- The default valign value for <td> is middle for all browsers anyway.
-----------
> <form method="post" action="/cgi-bin/test.pl">
> <table width='90%' border='1' cellpadding='2'>
This is the correct way to "insert" a form "inside" a table: the form wraps the table element.
Please consult Web Authoring FAQ: HTML Forms
Section 10.3
How can I use tables to structure forms?
http://www.htmlhelp.com/faq/html/forms.html#form-nospace
Section 10.4
How can I eliminate the extra space after a </form> tag?
http://www.htmlhelp.com/faq/html/forms.html#form-tables
Reporter | ||
Comment 2•18 years ago
|
||
(In reply to comment #1)
> 1- The above implies improper nesting of elements. Elements must not overlap:
> http://www.mozilla.org/docs/web-developer/upgrade_2.html#incorrectnesting
>
Sorry, bad example, but the real problem was the extra-space after the </form> tag:
> Section 10.4
> How can I eliminate the extra space after a </form> tag?
> http://www.htmlhelp.com/faq/html/forms.html#form-tables
>
Never seen this previosly, so was quite puzzled to see adjacent buttons misaligned when upgraded from Mozilla 1.7.13 to Seamonkey 1.0.5 (1.8.0.7). So now I'll know better this works as supposed.
Comment 3•18 years ago
|
||
Browsers have default values for many elements involving all kinds of properties.
e.g.:
"Form default margin-top is now 0, and margin-bottom now 1em."
http://www.opera.com/docs/changelogs/windows/900/index.dml
Important and unknown default browser values
http://www.gtalbot.org/DHTMLSection/BrowsersDefaultValues.html
Resolving as INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•