Formular Button in einer Tabelle

Status
Nicht offen für weitere Antworten.

el loco mO

Grünschnabel
hallo,

ich habe das prob. das ich in einer tabelle mehrer form. von dem type button untereinander verwenden möchte, aber es so aussieht als ob bei diesen forumlaren immernoch unter dem button ein "unsichtbare Feld" vorhanden ist...was dann meine formatierung der tabelle total zerstört....dadurch kann ich nicht zentrieren und nicht die zellenhöhe einhalten die ich gerne hätte etc... etc...

hier der CODE:
*edit*

HTML:
<html>
<head>
<title>bla bla beispiel</title>
</head>

<body>
<table width="800" height="200" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="50"> <input type="submit" value="Absenden"></td>
    <td width="400" height="50">Text</td>
    <td width="200" height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><input type="image" src="http://de.selfhtml.org/html/formulare/anzeige/absende.gif" alt="Absenden"></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><form action="button.htm"><button name="Klickmich" type="button" value="SELFHTML" onclick="self.location.href='http://aktuell.de.selfhtml.org/'"><b>FormButton</b></button></form></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
</table>
</body>

</html>


Danke schonmal!
btw. bitte helft mir!


;D
 
Zuletzt bearbeitet:
Sorry, dein XHTML-Dokument ist nicht valide:

w3c-validator hat gesagt.:
1. Error Line 10 column 26: there is no attribute "height".

<table width="800" height="200" border="1" cellpadding="0" cellspacing="0">
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


2. Error Line 12 column 80: there is no attribute "height".

...e="submit" value=" Absenden " height="50" /></td>


3. Error Line 23 column 53: there is no attribute "height".

...50"><form action="button.htm" height="50"><button name="Klickmich" type="butt


4. Error Line 23 column 184: there is no attribute "height".

...://aktuell.de.selfhtml.org/'" height="50"><b>FormButton</b></button></form></

>>> w3c-Validator
 
Das Problem liegt wohl am falsch gesetzten <form>- und </form>:

Code:
<table width="800" height="200" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="50"> <input type="submit" value="Absenden"></td>
    <td width="400" height="50">Text</td>
    <td width="200" height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><input type="image" src="http://de.selfhtml.org/html/formulare/anzeige/absende.gif" alt="Absenden"></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><form action="button.htm"><button name="Klickmich" type="button" value="SELFHTML" onclick="self.location.href='http://aktuell.de.selfhtml.org/'"><b>FormButton</b></button></form></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
</table>

Die 3 Klick-Buttons sollten in einem Formular eingesetzt werden - also:

HTML:
<form action="button.htm">
<table width="800" height="200" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="50"> <input type="submit" value="Absenden"></td>
    <td width="400" height="50">Text</td>
    <td width="200" height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><input type="image" src="http://de.selfhtml.org/html/formulare/anzeige/absende.gif" alt="Absenden"></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50"><button name="Klickmich" type="button" value="SELFHTML" onclick="self.location.href='http://aktuell.de.selfhtml.org/'"><b>FormButton</b></button></td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
  <tr>
    <td height="50">Text</td>
    <td height="50">Text</td>
    <td height="50">Text</td>
  </tr>
</table>
</form>

Da ich dieses Thema abonniert habe, erhielt ich um 13:49 eine Info-Mail über dein Posting mit folgendem Wortlaut:

Dies ist der Beitrag, der gerade geschrieben wurde:
***************
ich habe den html code etwas angepasst...versuchmal ob du immernoch deine komischen fehlermeldungen bekommst....
Stimmt, du hast die komplette Doctype-Deklaration deines (ursprünglichen) XHTML-Dokuments aus dem Quelltext entfernt :suspekt:

Damit kann der Validator noch weniger anfangen:

w3c-validator hat gesagt.:
No Character Encoding Found! Falling back to UTF-8.

I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to reliably validate the document. I'm falling back to the "UTF-8" encoding and will attempt to perform the validation, but this is likely to fail for all non-trivial documents.

No DOCTYPE found! Attempting validation with HTML 4.01 Transitional.

The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax. Validation has been performed using a default "fallback" Document Type Definition that closely resembles "HTML 4.01 Transitional", but the document will not be Valid until you have corrected this problem with the DOCTYPE Declaration.

This page is not Valid (no Doctype found)!
Below are the results of attempting to parse this document with an SGML parser.

1. Error Line 1 column 0: no document type declaration; implying "<!DOCTYPE HTML SYSTEM>".

<html>

The checked page did not contain a document type ("DOCTYPE") declaration. The Validator has tried to validate with a fallback DTD, but this is quite likely to be incorrect and will generate a large number of incorrect error messages. It is highly recommended that you insert the proper DOCTYPE declaration in your document -- instructions for doing this are given above -- and it is necessary to have this declaration before the page can be declared to be valid.


2. Error Line 7 column 26: there is no attribute "HEIGHT".

<table width="800" height="200" border="1" cellpadding="0" cellspacing="0">

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
 
vielen Dank... manchmal sind es nur Kleinigkeiten auf die man einfach nicht kommt...es funktioniert wenn ich die ganze tabelle in das formular einschliesse und nicht nur die zelle...


und ich habe nicht einfach nur den doctyp gelöscht sondenr auch noch andere sachen angepasst die davor fehler ausgespuckt haben...ausserdem muss das doch nicht wc3 Valid sein...
 
el loco mO hat gesagt.:
ausserdem muss das doch nicht wc3 Valid sein...

Der Begriff valid kommt aus dem Englischen und heisst übersetzt gültig, oder auch regelkonform.

Es ist deine freie Entscheidung, nicht-regelkonforme (X)HTML-Dokumente im Internet zu veröffentlichen. Du darfst dich dann aber auch nicht wundern, wenn diese non-valid Seite in den Browsers der neueren Generation fehlerhaft dargestellt wird.
 
Status
Nicht offen für weitere Antworten.
Zurück