diff --git a/css/reservations.css b/css/reservations.css index e69de29..c9d8a86 100644 --- a/css/reservations.css +++ b/css/reservations.css @@ -0,0 +1,69 @@ +body{ + background-color: #fdd46b; + +} + + +.container{ + width: 550px; +height: 500px; +background-color: whitesmoke; +border-radius: 10px; /*gives rounded corners*/ +position: relative; +margin: 8% auto; + +} + + +h2{ + text-align: center; + margin-bottom: 40px; + color: #03071E; +} + + +.container form{ + width: 380px; + top: 40px; + left: 60px; + position: absolute; /*positioned relative to the container */ + +} + +form input{ + width: 100%; + padding: 10px 5px; + margin: 5px 0; + border: 0px; + border-bottom: 1px solid #999; + outline: none; + color: transparent; +} + +.btn-box{ + + width: 100px; + margin: 30px auto; + margin-left: 125px; + text-align: center; + +} + +form button{ + width: 150px; + height: 50px; + background: linear-gradient( to right, #ff105f ,#ffad06); + border-radius: 30px; + border:0px; + cursor:pointer; /*makes the arrow as hand when hovering over the button*/ + +} + +#form2{ + left: 600px; +} + + +#form3{ + left: -500px; +} diff --git a/js/reservation.js b/js/reservation.js index 8c164e0..18dabbd 100644 --- a/js/reservation.js +++ b/js/reservation.js @@ -4,10 +4,13 @@ let buttons = document.getElementById('confirm'); document.addEventListener('submit', validateForm); let cardName=document.getElementById('fullName'); + function validateForm(event) { alert(`${cardName.value} Thank you for confirming your reservation`); + event.preventDefault(); + table.textContent=''; } @@ -25,7 +28,6 @@ fees.appendChild(extraF); function calculate() { let weight = document.getElementById('weight').value; - console.log(weight); if (weight <= 20) { @@ -35,9 +37,10 @@ function calculate() { extraF.textContent = `${(weight - 20) * 5} $`; + } -} +} diff --git a/pages/reservations.html b/pages/reservations.html index db07ecb..2cb9126 100644 --- a/pages/reservations.html +++ b/pages/reservations.html @@ -5,6 +5,7 @@ +