|
|||
kleines Label-Prob...
Morgen allerseits...
Habe auf einer Login-Seite ein Eingabe-Feld mit Name und Kennung. Funzt soweit auch. Wenn ich das ganze aber jetzt durch den Validator schicke bekomme ich bei folgender Zeile: Code:
<label for="login_name">Login:</label> Error Line 29 column 28: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag. <label for="login_name">Login: The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). Wenn ich jetzt ein <div></div> auf jede Zeile setze bekomme ich keine Fehlermeldung, haber aber noch nirgendwo gesehen dass es so gemacht wird...im Gegenteil. Ich kann zu manchen Codes-Tutorials im Netz keinen Unterschied finden...oder ich übersehe was... hat jemand von euch eine Idee? hier noch mal der gesammte Code der Seite: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> <head> <title>Login</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="author" content="" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> </head> <body> <div id="wrapper"> <h1>Login</h1> <hr /> <div id="content-vita"> <div class="lang"> <div id="login"> Falscher Name oder falsches Kennwort. Bitte versuchen Sie es noch einmal.<br /><br /> <form action="login_db.php" method="post"> <label for="login_name">Login:</label> <input name="login_name" id="login_name" type="text" /><br /> <label for="login_passwort">Kennwort:</label> <input name="login_passwort" id="login_passwort" type="password" /><br /> <label for="submit"></label> <input name="absenden" type="submit" class="submit" value="Absenden" /> <input type="reset" name="Reset" class="reset" value="Löschen" /> </form> </div> </div> </div> <hr /> </div> <div id="footer"></div> </body> </html> Code:
.submit,.reset { background-color: #BEBBB2; width: 7em; border: 1px #222; color: #222; font-family: verdana, arial, helvetica, sans-serif; } form { padding: 10px; width: 450px; line-height: 120%; } input { display: block; width: 325px; float: left; border: 1px #222; background-color:#BEBBB2; margin: 5px; padding: 2px; line-height: 120%; } input:focus, input:hover, textarea:focus, textarea:hover { background-color:#F1F0ED; } textarea { display: block; width: 325px; float: left; border: 1px #222; background-color:#BEBBB2; margin: 5px; padding: 2px; line-height: 120%; } #nummer { width: 7em; } #plz { width: 7em; } br { clear:left; } label { width: 7em; margin: 5px; padding: 5px; float: left; text-align: right; } #login { position: relative; z-index:1; float:left; top: 100px; left: 10px; width: 450px; height: 100px; margin: 0 0 0 0px; padding: 0px 0px; text-align: left; } Ragna...
__________________
Gott ist ein Popstar!!! |
Sponsored Links |
|
|||
Arghhhhhhhh....ich Dummerchen...in meinem Kontakt-Formular habe ich es drinn und da vergessen...
so schnell kann das gehen.. besten dank eine andere Frage noch: bekomme jetzt nur noch die Fehlermeldung bezüglich des Submit-Labels. Ich weiss, ist nicht xhtml-konform...aber wenn ich es nicht reinmache sind die Buttons unten nicht bündig mit den Eingabefeldern, und wenn ich versuche sie per css auszurichten werden sie im FF zuerst klein dargestellt und beim drüber gehen größer. Das hat irgendwas mit dem "position: relative" zu tun...denn wenn ich das rausnehme sind sie normalgroß...auch im FF...nur natürlich nicht ausgerichtet... was kann ich da machen? Ich weiss, laut Validator wird es nicht als "Fehler" ausgegeben...aber trotzdem stört es mich dass es nicht 100% ist... besten dank Ragna
__________________
Gott ist ein Popstar!!! |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Dynamische Inputfeld-Breite mit Label | user2017 | CSS | 5 | 07.01.2017 02:54 |
Element label über id ansprechen | Evoli | CSS | 8 | 28.08.2007 13:36 |
CSS hover IE: kleines Prob mit ":visited" | KungFuZius | CSS | 25 | 10.05.2007 15:52 |
label und tabelle abstand | xm22 | CSS | 1 | 10.04.2006 10:51 |
Anordnung von Label und Input? | o.dey | Barrierefreiheit | 5 | 09.01.2006 17:51 |