I want to center the DIV in the middle of the page , which I do, but I do not want to center ALL the elements. I want the elements to have a vertical alignment (name, description, price).
Only Name and Image are at the same level, others are not respected.
Code:
<div class="formulario_cabana">
<form action="<?php echo $_SERVER['PHP_SELF'];?>" enctype="multipart/form-data" name="anadir_cabana" id="anadir_cabana" method="POST" onsubmit="return validar_formulario_cabana();">
<label for="nombre">Nombre: </label>
<input type="text" id="nombre" name="nombre" />
<label for="capacidad">Capacidad: </label>
<?php
echo "<select name='capacidad'>";
for($i=1; $i<11; $i++){
if($i==1){
echo "<option value='$i' selected='selected'>$i</option>";
}else{
echo "<option value='$i'>$i</option>";
}
}
echo "</select>";
?>
<br/><br/>
<label for="descripcion">Descripción: </label>
<input type="text" id="descripcion" name="descripcion" />
<br/><br/>
<label for="precio">Precio: </label>
<input type="text" id="precio" name="precio" onkeypress="return soloNumeros(event);" />
<br/><br/>
<b>Accesorios:</b><br/>
<label for="secador">Secador:</label>
<input type="checkbox" id="secador" name="accesorios[]" value="1" />
<label for="calefaccion">Calefaccion: </label>
<input type="checkbox" id="calefaccion" name="accesorios[]" value="2" />
<br/><br/>
<label for="jacuzzi">Jacuzzi: </label>
<input type="checkbox" id="jacuzzi" name="accesorios[]" value="3" />
<label for="tv">TV: </label>
<input type="checkbox" id="tv" name="accesorios[]" value="4" />
<br/><br/>
<label for="internet">Internet: </label>
<input type="checkbox" id="internet" name="accesorios[]" value="5" />
<label for="microondas">Microondas: </label>
<input type="checkbox" id="microondas" name="accesorios[]" value="6" />
<br/><br/>
<!-- Subir imagen cabaña -->
<label for="imagen">Imagen:</label>
<input type="file" name="imagen" id="imagen" /> <!-- multiple="multiple" -->
<br/><br/>
<input type="submit" value="Guardar" id="guardar_cabana" name="guardar_cabana" />
<input type="reset" value="Resetear" id="resetear" name="resetear" />
</form>
</div>
CSS Code:
.formulario_cabana{
text-align: center;
}