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 solutions/position/3/Position 3 Solution.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions solutions/position/3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<title>Position 3 Solution</title>
</head>

<body>
<div class="search-box">
<div class="search-icon">
<i class="fa fa-search"></i>
</div>
<input type="text" class="search-input" placeholder="Search">
</div>
</body>

</html>
39 changes: 39 additions & 0 deletions solutions/position/3/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}

body{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.search-icon{
position: absolute;
font-size: 20px;
top: 14px;
left: 14px;
}

.search-input{
font-size: 18px;
border: 3px solid #aaaaaa;
width: 300px;
padding: 12px;
border-radius: 48px;
}

.search-input::placeholder{
padding-left: 28px;
}

.search-input:focus{
padding-left: 44px;
}

.search-input:focus::placeholder{
color: transparent;
}