• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

The next Question - Kontaktformular und Bild

Maase

Neues Mitglied
Yeah, Ich habe mal wieder eine Frage :D
Und zwar:
c3wht83l4ygqypbj7.jpg


Wie bekomme ich das Kontaktformular neben das Bild also Zentriert??
Hier der Code:
HTML:
<html>
<head>
<body style="background-image:url(http://www.nof-schule.de/assets/images/zentriert.gif); background-repeat: repeat-y-x;">


<title>Titel</title>
  <meta name="description" content="Beschreibung" />
  <meta name="keywords" content="Keywords" />
  <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  
  <style type="text/css">


#Tabelle
{
color: #FF0000;
margin-top: 200px;
}


</style>


<h1 style="color: red">Kontaktformular </h1>
<form method="post" action="hallo.php">
    <table border="1">
        <tr>
            <td style="color: yellow">Anrede</td>
            <td style="color: yellow">Herr: <input type="radio" value="Herr" name="anrede">
    Frau: <input type="radio" value="Frau" name="anrede"></td>
        </tr>
        <tr>
            <td style="color: yellow">Vorname</td>
            <td><input type="text" color="yellow" name="vorname"></td>
        </tr><tr>
            <td style="color: yellow" >Nachname</td> <color="yellow">
            <td><input type="text" name="nachname"></td>
        </tr><tr>
            <td style="color: yellow">Email</td>
            <td><input type="text" name="Email"></td>
        </tr><tr>
            <td style="color: yellow">Betreff</td>
            <td><input type="text" color="yellow" name="Betreff"></td>
        </tr><tr>
            <td style="color: yellow">Ihre Nachricht an uns:</td>
            <td><textarea cols="45" rows="15"></textarea></td>
        </tr><tr>
            <td></td>
            <td><input type="submit" name="nachricht" value="abschicken!!!"><input type="reset" value="Daten l&ouml;schen."></td>
        </tr>
    </table>
    <img src="http://www.ingenieurbuero-wilkens.de/images/kontakt_.jpg" height="347" width="695" style="padding: 120px 0px 0px 600px;">
</form>


</form>
</body>
</head>
</html>
Der unterste Code mit img ist das Bild ;)
Danke im Vorraus!!

Gruß
 
Zuletzt bearbeitet:
Z.B. so:

Code:
form {
 display: block;
 margin: 0 auto;
 width: 998px;
}

Idealerweise solltest Du dem Formular auch noch eine Klasse dafür geben.

Und: dein HTML-Code ist nicht ganz sauber. Zum Einen ist unten ein </form> zuviel. Zum Anderen baut man HTML-Formulare nicht in Tabellen auf, vor allem Kontaktformulare.
 
Hallo,
Erstmal danke für deine Antwort!!
Ich bin auch noch anfänger!!
Wo soll ich denn den Code da oben eingeben?

Zu den Tabellen.........
Dann mache ich es raus^^
 
Da das CSS-Code ist, gehört das auch in den Bereich des CSS-Codes bzw. die externe CSS-Datei.
 
HTML:
<head><body style="background-image:url(http://www.nof-schule.de/assets/images/zentriert.gif); background-repeat: repeat-y-x;">
<title>Titel</title>  <meta name="description" content="Beschreibung" />  <meta name="keywords" content="Keywords" />  <meta http-equiv="content-type" content="text/html; charset=windows-1252" />  <link rel="stylesheet" type="text/css" href="style/style.css" />    <style type="text/css">form { display: block; margin: 0 auto; width: 998px;}
#Tabelle{color: #FF0000;}</style>

Ich habe das jetzt da eingefügt??
passiert aber nichts :(
 
Ich wollte nicht den ganzen Code hinschreiben ;)
Hier ist der ganze:
HTML:
<html><head><body style="background-image:url(http://www.nof-schule.de/assets/images/zentriert.gif); background-repeat: repeat-y-x;">
<title>Titel</title>  <meta name="description" content="Beschreibung" />  <meta name="keywords" content="Keywords" />  <meta http-equiv="content-type" content="text/html; charset=windows-1252" />  <link rel="stylesheet" type="text/css" href="style/style.css" />    <style type="text/css">form { display: block; margin: 22 auto; width: 90px;}
#Tabelle{color: #FF0000;}</style>
<h1><color="yellow"> Kontaktformular </h1><form method="post" action="kontact.php">	<table border="1">		<tr>			<td>Anrede</td>			<td>Herr: <input type="radio" value="Herr" name="anrede">	Frau: <input type="radio" value="Frau" name="anrede"></td>		</tr>		<tr>			<td>Vorname</td>			<td><input type="text" color="yellow" name="vorname"></td>		</tr><tr>			<td>Nachname</td> <color="yellow">			<td><input type="text" name="nachname"></td>		</tr><tr>			<td>Email</td>			<td><input type="text" name="Email"></td>		</tr><tr>			<td>Ihre Nachricht an uns:</td>			<td><textarea cols="45" rows="15"></textarea></td>		</tr><tr>			<td></td>			<td><input type="submit" name="nachricht" value="abschicken!!!"><input type="reset" value="Daten l&ouml;schen."></td>		</tr>	</table>	</form>
</form></body></head></html>

Gruß

DocTYPE??
 
HTML:
c3wn4pd142e9tiisj.jpg


Ich habe diese Variante genommen:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd"><html><head><body style="background-image:url(http://www.nof-schule.de/assets/images/zentriert.gif); background-repeat: repeat-y-x;">
<title>Titel</title>  <meta name="description" content="Beschreibung" />  <meta name="keywords" content="Keywords" />  <meta http-equiv="content-type" content="text/html; charset=windows-1252" />  <link rel="stylesheet" type="text/css" href="style/style.css" />    <style type="text/css">form { display: block; margin: 40px auto; width: 1260px;}#Tabelle{color: #FF0000;margin-top: 200px;}
</style>
<h1 style="color: red">Kontaktformular </h1><form method="post" action="hallo.php">	<table border="1">		<tr>			<td style="color: yellow">Anrede</td>			<td style="color: yellow">Herr: <input type="radio" value="Herr" name="anrede">	Frau: <input type="radio" value="Frau" name="anrede"></td>		</tr>		<tr>			<td style="color: yellow">Vorname</td>			<td><input type="text" color="yellow" name="vorname"></td>		</tr><tr>			<td style="color: yellow" >Nachname</td> <color="yellow">			<td><input type="text" name="nachname"></td>		</tr><tr>			<td style="color: yellow">Email</td>			<td><input type="text" name="Email"></td>		</tr><tr>		    <td style="color: yellow">Betreff</td>			<td><input type="text" color="yellow" name="Betreff"></td>		</tr><tr>			<td style="color: yellow">Ihre Nachricht an uns:</td>			<td><textarea cols="45" rows="15"></textarea></td>		</tr><tr>			<td></td>			<td><input type="submit" name="nachricht" value="abschicken!!!"><input type="reset" value="Daten l&ouml;schen."></td>		</tr>		<table style="float:right;">		<img src="http://www.ingenieurbuero-wilkens.de/images/kontakt_.jpg" height="347" width="695">		</table>	     </table>	</form>
</body></head></html>

Leider tut sich nichts :(

Gruß
 
Zurück
Oben