I have two buttons at different heights, why is that? The buttons are called: back and pay.
I show you the HTML and CSS code.
<?php
<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Confirmación reserva</title>
<link rel="stylesheet" href="css/estilos_confirmacion.css">
</head>
<body>
<?php
echo"<br/>";
//Si existe y hemos pulsado el botón "Reservar"...
if(isset($_POST["reservar"])){
echo "<form action='pagar.php' name='mireserva' id='mireserva' method='POST' style='text-align:center'>";
echo "<div id='detalles_reserva'>";
echo
"<img src='imagenes/cabaña.png' height='22px' width='22px' alt='Cabaña'> Cabaña: ".$idcabana."
<br/><br/>".
"<img src='imagenes/email.png' height='22px' width='22px' alt='Cabaña'> Email: ".$idemail."
<br/><br/>".
"<img src='imagenes/calendario.jpg' height='22px' width='22px' alt='Check_in'> Check_in: ".$check_in."
<br/><br/>".
"<img src='imagenes/calendario.jpg' height='22px' width='22px' alt='Check_out'> Check_out: ".$check_out."<br/><br/>";
echo "</div>";
echo "<br/>";
echo "<div id='mostrar_imagenes'>";
//Cargamos las imágenes en un array $imagenes.
$imagenes = BD::obtenerImagenesCabana($idcabana);
foreach($imagenes as $imagen){
echo "<img src='imagenes/".$imagen."' width='220' height='200' onclick='cambiarImagen(this)'/> ";
}
echo "<br/>";
echo "</div>";
echo "<br/><br/><br/><br/>";
echo "<center><a href='imagenes/".$imagenes[0]."' class='zoom'> <img id='grande' src='imagenes/".$imagenes[0]."' width='460' height='400'/> </a></center>";
echo "<br/><br/><br/><br/><br/><br/><br/>";
echo "<input type='image' src='imagenes/pagar.png' height='20px' width='26px' name='pagar' id='pagar' />";
echo "<input type='image' src='imagenes/atras.png' height='20px' width='26px' name='atras' id='atras' onclick='javascript:history.back();'/>";
echo "</form>";
}else{
//Si recargamos la página perdemos los datos, así que volvamos al inicio: "reservar.php".
unset($_SESSION["cliente"]);
header("Refresh:0; url=iniciar_sesion_cliente.php");
}
?>
</body>
</html>
#detalles_reserva{
margin: auto;
width: 50%;
max-width: 500px;
max-height: 900px;
background: #F3F3F3;
padding: 30px;
border: 1px solid rgba(0,0,0,0.2);
}
#mostrar_imagenes{
margin: auto;
width: 80%;
max-width: 940px;
max-height: 200px;
background: #F3F3F3;
padding: 20px;
border: 1px solid rgba(0,0,0,0.2);
}
#atras,
#pagar {
position: absolute;
background: skyblue;
color: black;
padding: 10px;
border-radius: 5px;
bottom: 10px;
text-decoration: none;
}
#atras:hover,
#pagar:hover {
background: rgba(135, 206, 235, 0.8);
color: blue;
cursor: pointer;
}
#pagar {
position: relative;
left: 180px;
top: -6em;
}
#atras {
position: relative;
left: -200px;
top: 1em;
}
#grande{
width: 460px;
}
They must be at the same height.