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
Binary file added background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Paint Quote System - Sign Up</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="page">
<div class="left">
<h1>Welcome to Paint Quote System</h1>
<div class="line"></div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use ::after to avoid adding an additional element, as ::after is a pseudo-element that belongs to an element, so it can be attached to the h1

<p>
Consequat adipisicing ea do labore irure adipisicing occaecat
cupidatat excepteur duis mo
</p>
</div>

<div class="card">
<h2>Sign Up</h2>
<p class="subtitle">Enter details to create your account</p>

<div class="form-group">
<label for="name">Your name</label>
<input id="name" type="text" placeholder="Enter your name" />
</div>

<div class="form-group">
<label for="phone">Phone number</label>
<input id="phone" type="tel" placeholder="Enter your phone number" />
</div>

<div class="form-group">
<label for="dulux">Dulux account</label>
<input id="dulux" type="text" placeholder="Enter your Dulux account" />
</div>

<button type="button">Sign up</button>
Comment on lines +24 to +39

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can wrap all the inputs and button in a form element for better practice, as browsers havedefault behaviours for form element


<p class="signin-box">
Already have an account?
<a href="#">Sign in</a>
</p>
</div>
</div>
</body>
</html>
125 changes: 125 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
* {
box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-image: url("background.png");
background-size: cover;
background-position: center;
}

.page {
display: flex;
justify-content: space-between;
align-items: center;
padding: 40px;
min-height: 100vh;
}
Comment on lines +14 to +20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. usually min-height is set on the body element, as every page has body element but not every page has .page class
  2. can set a max-width as the current space-between causes the left and card to be too far apart on large screens, or you can use gap or relative unit (%) for better pracrtice


.left {
max-width: 380px;
}

.left h1 {
font-size: 28px;
margin-bottom: 10px;
}

.left p {
color: #555;
line-height: 1.4;
}

.line {
width: 100px;
height: 2px;
background-color: #333;
margin: 12px 0 16px;
}

.card {
width: 380px;
background: #ffffff;
border-radius: 12px;
padding: 30px 28px;
border: 1px solid #ddd;
}

.card h2 {
text-align: center;
margin-bottom: 6px;
font-size: 24px;
}

.subtitle {
text-align: center;
color: #777;
font-size: 14px;
margin-bottom: 20px;
}

.form-group {
margin-bottom: 15px;
}

.form-group label {
font-size: 14px;
margin-bottom: 5px;
display: block;
}

.form-group input {
width: 100%;
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 14px;
}

button {
width: 100%;
padding: 12px;
background-color: #0b74b8;
border: none;
color: white;
border-radius: 6px;
font-size: 15px;
cursor: pointer;
margin-top: 10px;
}

.signin-box {
text-align: center;
margin-top: 15px;
font-size: 14px;
}

.signin-box a {
color: #0b74b8;
text-decoration: none;
}

@media (max-width: 768px) {
.page {
flex-direction: column;
align-items: center;
padding: 20px;
}

.left {
text-align: c

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this value is invalid

}

.line {
margin-left: auto;
margin-right: auto;
}

.card {
width: 100%;
max-width: 380px;
}
}