Bonjour,
J'ai un petit souci avec l'alignement des labels pour deux des 10 champs du formulaire.
Cela concerne les champs Adresse postale (champ4) et Message (champ10) dont les largeurs sont pourtant les mêmes que pour le champ3 qui ne pose pas de problème d'alignement. Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!-- DEBUT de la table du FORMULAIRE DE CONTACT -->
	<form name="formulaire" method="post" action="<?php echo($_SERVER['SCRIPT_NAME']); ?>" onsubmit="return verifSelection()">
	<fieldset>
	<legend>Formulaire de contact</legend>
<?php
if ($flag_erreur == 1) {
	echo("<div id=\"error\" class=\"error-displayed\">$erreur</div><br />");
} else {
	echo("<div id=\"error\" class=\"error\"></div><br />");
}
?>
<div class="txtSmall" style="text-align: center;">Les champs marqués d'un <span style="color: rgb(0, 255, 0);">*</span> sont obligatoires.</div>
<br /><br />
<div align="left"><label for="champ1">Votre Nom <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ1" id="champ1" type="text" maxlength="30" size="40" value="<?php echo(stripslashes($_SESSION['champ1'])); ?>" class="<?php echo($error_class_1); ?>" /></div><br />
<div align="left"><label for="champ2">Prénom <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ2" id="champ2" type="text" maxlength="30" size="40" value="<?php echo(stripslashes($_SESSION['champ2'])); ?>" class="<?php echo($error_class_2); ?>" /></div><br />
<div align="left"><label for="champ3">Email <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ3" id="champ3" type="text" maxlength="120" size="60" value="<?php echo(stripslashes($_SESSION['champ3'])); ?>" class="<?php echo($error_class_3); ?>" /></div>
<div style="text-align: left;"><span style="color: rgb(255, 255, 0);"><em><span style="font-size: 8pt;">Afin de vous répondre, vérifier l'exactitude de votre adresse mail.</span></em></span><br /></div>
<div align="left"><label for="champ4"><em>Adresse postale </em></label>
<textarea name="champ4" id="champ4" cols="60" rows="2" maxlength="120" size="60" class="<?php echo($error_class_4); ?>"><?php echo(stripslashes($_SESSION['champ4'])); ?></textarea></div><br />
<div align="left"><label for="champ5">Code Postal <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ5" id="champ5" type="text" maxlength="10" size="15" value="<?php echo(stripslashes($_SESSION['champ5'])); ?>" class="<?php echo($error_class_5); ?>" /></div><br />
<div align="left"><label for="champ6">Ville <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ6" id="champ6" type="text" maxlength="30" size="40" value="<?php echo(stripslashes($_SESSION['champ6'])); ?>" class="<?php echo($error_class_6); ?>" /></div><br />
<div align="left"><label for="champ7">Téléphone usuel <span style="color: rgb(0, 255, 0);">*</span></label>
<input name="champ7" id="champ7" type="text" maxlength="30" size="40" value="<?php echo(stripslashes($_SESSION['champ7'])); ?>" class="<?php echo($error_class_7); ?>" /></div><br />
<div align="left"><label for="champ8"><em>Téléphone autre </em></label>
<input name="champ8" id="champ8" type="text" maxlength="30" size="40" value="<?php echo(stripslashes($_SESSION['champ8'])); ?>" class="<?php echo($error_class_8); ?>" /></div><br />
<div align="left"><label for="champ9">Objet du message <span style="color: rgb(0, 255, 0);">*</span></label>
<select name="champ9" id="champ9" maxlength="120" class="<?php echo($error_class_9); ?>" ><option value="">S&eacute;lectionner...</option>
<option value="Chambres d'Hôtes"<?php
if ($_SESSION['champ1'] == "Chambres d'Hôtes") {
echo(" selected");
}
?>>Chambres d'Hôtes</option>
<option value="Autre..."<?php
if ($_SESSION['champ1'] == "Autre...") {
echo(" selected");
}
?>>Autre...</option>
</select></div><br />
 
<div align="left"><label for="champ10">Message <span style="color: rgb(0, 255, 0);">*</span></label>
<textarea name="champ10" id="champ10" cols="60" rows="10" maxlength="120" size="60" class="<?php echo($error_class_10); ?>"><?php echo(stripslashes($_SESSION['champ10'])); ?></textarea></div><br />
 
<!-- Insertion des BOUTONS "Effacer" et "Envoyer" -->
<style type="text/css"> 
input[type=submit]{
	background:#D4D0C8;
	cursor:pointer;
}
input[type=submit]:hover{
	background:#FFF;
}
</style> 
<div align="left" class="submit"><input type="reset" name="Reset" value="Effacer" />&nbsp; 
<input type="submit" name="envoi" value="Envoyer" /></div>
</fieldset>
</form>
</div>	
<!-- FIN de la table du FORMULAIRE DE CONTACT -->
Merci pour l'aide.:-)