Aliniere elemente din formular

Coduri intrebari, probleme legate de HTML, XHTML si CSS
Al3x
Mesaje: 3

Aliniere elemente din formular

salut as vrea sa fac si eu un formular de trimetere email cu niste date..dar nu imi reuseste la un lucru

Imagine
cum pot face sa imi apara pe mijloc liniile "Cate licente vrei:" si "Metoda de plata:" si vad ca sunt dezordonate...la "cate licente vrei" arata metoda de plata si la "metoda de plata" arata in ce retea sa plateasca....va rog sa ma ajutati sa il configurez!
sau daca aveti alta interfata cu aceleasi optiuni sa mil faceti ar fi super...

am aici si php si html
  • Index.html

Cod: Selectaţi tot

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Formular</title>
<style type="text/css">
.style1 {
	text-align: center;
}
.style2 {
	font-size: xx-large;
	text-decoration: underline;
	font-family: Batang;
}
.style3 {
	font-size: x-small;
}
.style4 {
	font-family: Aharoni;
}
</style>
<meta content="powered by nume" name="description" />
</head>

<body style="background-color: #FFFFFF; background-image: url('kontaktbg.jpg');">
<form method="post" action="formular.php">
	<div class="style1">
		<br />
		<span class="style2"><strong>Formular</strong></span><br />
		<br />
<td>

	</div>

<div class="style1">
<table width="400" border="0">
	Nume:<br> 
	<input type="text" name="name" style="width: 400px; height: 22px"><br>
	Parola admin:<br>	
	<input type="text" name="parola" style="width: 400px; height: 22px"><br />

	Cate licente vrei:<br> 
  <td align=""><select class="inp" name="numarul">
		<option value="1 licenta" selected>[1] 1 x licenta = 4 euro</option>
		<option value="2 licente">[2] 2 x licenta = 7 euro</option>
		<option value="3 licente">[3] 3 x licenta = 10 euro</option>
		<option value="4 licente">[4] 4 x licenta = 14 euro</option>
		<option value="5 licente">[5] 5 x licenta = 18 euro</option>
</select><br>


	Metoda de plata:<br> 
    <td align=""><select class="inp" name="metoda">
		<option value="sms(orange)">[1] sms(orange)</option>
		<option value="paypal">[2] paypal</option>
		<option value="banca">[3] banca</option>
</select><br>
	Emailul tau:<br> 
	<input type="text" name="email" style="width: 400px; height: 22px"><br>
</table>	

<table border="0">
<strong><br />
	Mesaj:</strong><br />&nbsp;<textarea name="Mesaj" style="width: 400px; height: 169px"></textarea><br />	
	<br /><input type="submit" name="Button" value="Trimite Mesaj">
	<input name="Reset1" type="reset" value="Stergeti Mesajul" /><br />
	</div>
</table>	
	<br />
	</form>
<div class="style1">
</td>

	<span class="style3"><span class="style4">Powered by 
	<a href="http://nume.ro">nume</a></span></span> </div>
</body>

</html>
si
  • formular.php

Cod: Selectaţi tot

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Anfrage wurde gesendet!</title>
<style type="text/css">
.style3 {
	font-size: x-small;
}
.style4 {
	font-family: Aharoni;
}
</style>
</head>

<body style="background-color: #ffffff; background-image: url('kontaktbg.jpg');">
<center>
<?PHP


// hier werden die ganzen felder für die mail definiert.
   $text ="Iata mesajul e-mail din formularul de contact din xfinal.info\n";
   $text.="Nume: $_POST[name]\n";
   $text.="Cate licente vrei: $_POST[numarul]\n";
   $text.="Metoda de plata: $_POST[metoda]\n";
   $text.="Emailul tau: $_POST[email]\n";
   $text.="Mesaj: $_POST[Mesaj]\n";

// hier werden die ganzen felder für die meldung nach dem senden definiert.   
   $vorname="Nume: $_POST[name]\n";
   $strasse="Cate licente vrei: $_POST[numarul]\n";
   $land="Metoda de plata: $_POST[metoda]\n";
   $email="Emailul tau: $_POST[email]\n";
   $anfrage="Mesaj: $_POST[Mesaj]\n";  
               
// hier findet man die mail Zeile mit der Adresse an die der Inhalt des Formular gesendet wird.   
   mail("rc1_zone@yahoo.com","Cerere din formularul de contact xfinal.info",$text);
   
// hier findet man schreibt man die Ausgabemeldungen die der Benutzer nach dem senden der Mail in seinem Browser angezeigt werden.    
   echo "Multe multumiri pentru mesajul dvs.!<br><br>";
   echo "Informatiile dvs. a fost trimise Administratorului!<br><br>";  

   
?>
<a href="javascript:history.back()">Inapoi la formular</a>
<br />
<br />
<br />
<br />
<br />
<span class="style3"><span class="style4">Powered by
<a href="www.xfinal.info">xfinal</a></span></span>
</center>
</body>
</html>

MarPlo
Fiind vorba de alinierea elementelor in pagina, tine de HTML si CSS (am mutat subiectul).
Sunt mai multe metode, cea mai simpla si rapida care am observat-o e urmatoarea:
- Sterge codurile:
<table width="400" border="0">
<td align="">
</table>

Al3x
merci mult...merge!

Subiecte similare