Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!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>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>
<input type="text" name="address" id="user_address">
</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>

<ul id="cardOptions">
<li class="creditCards">
<input type="radio" name="visa" id="visa">
<label for="visa">VISA</label>
</li>
<li class="creditCards">
<input type="radio" name="amex" id="amex">
<label for="amex">AmEx</label>
</li>
<li class="creditCards">
<input type="radio" name="mastercard" 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 on the card">
</li>
</ul>

<div class="centerAlign">
<button class="round-corners-5px unround-bottom-corners" type="submit">BUY IT!</button>
</div>

</fieldset>



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

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



form {
background-color: rgba(125, 197, 92, 0.849);
}

fieldset {
border: none;
}

ul {
padding: 0;
list-style-type: none;
display: flex;
flex-direction: column;
}

li {
border: 1px white solid;
border-radius: 5px;
margin: 2px 0;
padding: 10px;
background-color: rgba(166, 245, 129, 0.849);
text-align: center;
}


input {
border-radius: 2px;
border: none;
}

legend {
font-weight: bold;
font-family: Georgia, 'Times New Roman', Times, serif
}

li label {
float: left;
}


input[type="text"],
input[type="number"] {
width: 200px;
max-width: 100%;
float: right;
margin-right: 25%;
}

#user_address {
height: 4em;
}

.centerAlign {
margin: 0 auto;
display: block;
width: max-content;
text-align: center;
/* border: solid black 1px; */
}


button {
background-color: rgba(18, 53, 2, 0.849);
border-radius: 50px ;
padding: 10px;
color: white;
width: 150%;
border: none;
}

#cardOptions {
margin: 0;
padding: 0;
display: flexbox;
flex-direction: row;
}

#cardType {
display: block;
padding: 10px 0;
float: none;
text-align: left;
}

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

.creditCards label {
float: none;
}