Skip to content
Open
113 changes: 113 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!DOCTYPE html>
<html>

<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Form-Final</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
</head>

<body>
<div class="container">
<Form>
<fieldset>

<legend class="toppad">Step 1: Your Details</legend>
<ul>
<li>
<label for="user_name">Name</label>
<input type="text" name="user_name" id="user_name" placeholder="First and last name">
</li>
<li>
<label for="user_email">Email</label>
<input type="text" name="email" id="user_email" placeholder="example@domain.com">
</li>
<li>
<label for="user_phone">Phone</label>
<input type="text" name="phone" id="user_phone" placeholder="Eg. +447500000000">
</li>
</ul>

</fieldset>
<fieldset>


<legend>Step 2: Delivery Address</legend>


<ul>
<li>
<label for="user_address">Address</label>
<textarea maxlength="250"></textarea> <!-- changed this input from text to textarea -->


</li>
<li>
<label for="user_postcode">Post Code</label>
<input type="text" name="post" id="user_postcode">
</li>
<li>
<label for="user_country">Country</label>
<input type="text" name="country" id="user_country">
</li>
</ul>

</fieldset>
<fieldset>

<legend>Step 3: Card Details</legend>

<ul>
<li>

<label id="cardType">Card type</label>

<!-- i assigned the same name on all the radio buttons so you can only choose one of the
options, if you click another one after choosing one it will uncheck what you
initally picked -->

<ul id="cardOptions">
<li class="creditCards">
<input type="radio" name="click" id="visa">
<label for="visa">VISA</label>
</li>
<li class="creditCards">
<input type="radio" name="click" id="amex">
<label for="amex">AmEx</label>
</li>
<li class="creditCards">
<input type="radio" name="click" id="mastercard">
<label for="mastercard">Mastercard</label>
</li>
</ul>

</li>
<li>
<label for="cardNumber">Card number</label>
<input type="number" name="cardNumber" id="cardNumber">
</li>
<li>
<label for="securityCode">Security code</label>
<input type="number" name="securityCode" id="securityCode">
</li>
<li>
<label for="nameOnCard">Name on card</label>
<input type="text" name="nameOnCard" id="nameOnCard" placeholder="Exact name as on the card">
</li>
</ul>

<div class="centerAlign">
<button type="submit">BUY IT!</button>
</div>

</fieldset>



</Form>
</div>
</body>

</html>
121 changes: 121 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
.container {
max-width: 500px;
margin: auto;

}

#cardOptions {
margin: 0;
padding: 0;
}

/*-- Added white border,, still cannot figure out how to get some radius on the green form corners
Also just changed the color a bit --*/

form {
background-color: rgba(153, 182, 84, 0.993);
border: 10px solid #ffffff;
border-width: 20px 20px ;

}

/*-- Added body to get the remainder of the page colored black --*/

body {

background-color: #000000;
}

fieldset {
border: none;

}

/*-- Added some padding to all the ul's to streatch the list boxes closer
to the sides and somehow it worked--*/

ul {
list-style-type: none;
/* display: flex;
flex-direction: column;
*/
padding-right: 10px;
padding-left: 10px;
}



li {
border: 1px white solid;
padding: 10px;
background-color: rgb(194, 209, 109);
border-radius: 8px;
}



legend {
font-family: Georgia, 'Times New Roman', Times, serif;
font-weight: bold;
padding-left: 10px;

/*-- this padding left pulled step 1, 2, and 3 over to the--*/
/* padding-top: 20px;--- we need to somehow apply padding to top legend only,
this is making to much space between all the lists,,
font also is looking a bit small.. possibly change to h2,3??
kinda like you had it before we changed back to legend ---*/
}

.centerAlign {
margin: 0 35%;
display: inline-block;
width: max-content;
/* border: solid black 1px; */
}

/*-- I just did some tweaking on the button, the margin is moving the button horizontally,
the padding left and right is stretching the button, height is the thickness,,
also can not figure out how to decrease the padding on the top of the button if you look at
the form-final it has a smaller gap at the top of the button --*/

button {
color: white;
text-align: center;
background-color: rgb(41, 46, 17);
/* display: inline-block; */
vertical-align: 15px;
border-radius: 50px ;
/* padding: 10px; */
padding-left: 33px;
padding-right: 33px;
height: 30px;
}

#cardType {
display: block;
margin: 5px 0;
}

.creditCards {
border: none;
display: inline;
justify-content: left;
margin: 0 20px 0 0;
}

::placeholder {
opacity: 50%;
font-style: italic;
font-family: Georgia, 'Times New Roman', Times, serif;

}

.toppad {
padding-top: 20px;
}