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
118 changes: 118 additions & 0 deletions Lab2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/* Global Layout Set-up */
* {
margin: 0;
padding: 0;
box-sizing: border-box
}

.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin-top: 15px;
}

.container-item {
width: 400px;
margin: 15px;
background-color: #9cbc2b;
}

div {
padding-bottom: 1px;
}

form {
display: flex;
background-color: #9cbc2b;
max-width: 30%;
border-radius: 5px;
}

h3 {
padding: 1em;
}

label {
padding-left: .5em;
padding-right: 2em;
border-radius: 1px;
padding-bottom: 1px;
border-color:white;
}

label.pcode {
padding-right: 19px;
}

textarea {
margin: 0px;
width: 226px;
height: 100px;
border-radius: 5px;
border-style: none;
}

input {
padding-top: 5px;
padding-bottom: 5px;
border-radius: 5px;
margin-right: 1px;
border-color: white;
padding-left: 5px;
padding-right: 50px;
border-style: none;
}

input[type="radio"] {
margin: 14px -8px 7px 6px;
min-width: 0px;
}

input[type="address"] {
min-height: 90px;
}

input[type="submit"] {
color: #384313;
}

input[type="text"] {
font-weight:lighter;
font-style: italic;
}

input[type="tel"] {
font-weight:lighter;
font-style: italic;
}

fieldset {
min-width: 100%;
max-width: 30%;
border: 2px solid #e3ebc2;
border-width: 1px;
border-radius: 5px;
}

.bkcolor {
background-color:#b9cf6a;
padding:10px;
margin-bottom: 3px;
}

button {
padding: 12px 53px 12px 53px;
color: #FFF;
background-color: #384313;
font-size: 18px;
text-align: center;
font-style: normal;
border-radius: 36px;
margin: 10px 0 10px 0;
border-style: none;
}
.btn {
margin: 0 29%;
}
96 changes: 96 additions & 0 deletions Lab2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form</title>
<link rel="stylesheet" href="lab2.css">
</head>
<body>
<div class="container">
<form>
<div class="container-item">
<div>
<h3>Step 1: Your details</h3>
<fieldset class="bkcolor">
<div>
<label for="name">Name</label>
<input type="text" id="name" name="user_name" placeholder="First and last name">
</div>
</fieldset>

<fieldset class="bkcolor">
<div>
<label for="email">Email</label>
<input type="text" id="email" name="user_email" placeholder="example@domain.com">
</div>
</fieldset>

<fieldset class="bkcolor">
<label for="Phone">Phone</label>
<input type="tel" id="phone" name="user_phone" placeholder="Eg. +447500000000">
</fieldset>
</div>
<div>
<h3>Step 2: Delivery address</h3>
<fieldset class="bkcolor">
<div>
<label for="address">Address</label>
<textarea id="address" name="user_address"></textarea>
</div>
</fieldset>

<fieldset class="bkcolor">
<div>
<label for="postcode" class="pcode">Post Code</label>
<input type="postcode" id="postcode" name="user_postcode">
</div>
</fieldset>

<fieldset class="bkcolor">
<div>
<label for="country">Country</label>
<input type="country" id="country" name="user_country">
</div>
</fieldset>
</div>
<div>
<h3>Step 3: Card details</h3>
<fieldset class="bkcolor">
<div class="rbutton">
Card Type <br/>
<input type="radio" id="visa" name="card" value="visa">
<label for="visa">VISA</label>
<input type="radio" id="amex" name="card" value="amex">
<label for="amex">AmEx</label>
<input type="radio" id="mastercard" name="card" value="mastercard">
<label for="mastercard">Mastercard</label>
</div>
</fieldset>
<fieldset class="bkcolor">
<div>
<label for="cardnumber">Card Number</label>
<input type="number" id="cardnumber" name="user_card">
</div>
</fieldset>
<fieldset class="bkcolor">
<div>
<label for="securitycode">Security code</label>
<input type="number" id="securitycode" name="user_code">
</div>
</fieldset>
<fieldset class="bkcolor">
<div>
<label for="name">Name on card</label>
<input type="text" id="name" name="user_name" placeholder="Exact name on the card">
</div>
</fieldset>
<div class="btn">
<button type="submit">Buy IT!</button>
</div>
</div>
</div>
</form>
</div>
</body>
</html>