- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Text input field, step 1</title>
<meta charset="utf-8">
<link rel="stylesheet" href="material.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="purple-theme">
<section class="card">
<h1 class="question"><span>What was the very first web browser was called?</span></h1>
<form class="answers" action="https://echo.htmlacademy.ru/courses" method="post">
<button class="fab" type="submit"></button>
<div>
<!--
<input type="text" required>
<div class="label-box">
<label>Word in English</label>
</div>
-->
</div>
</form>
</section>
</body>
</html>
CSS
.label-box {
position: relative;
width: 270px;
}
input {
box-sizing: border-box;
padding: 5px;
width: 270px;
font-size: 18px;
}
label {
color: #757575;
font-size: 18px;
pointer-events: none;
}
You’ve gone to a different page
Goalscompleted
0
- Uncomment the text input field and its label.
- Remove all of the borders from the input field using
border: none
, and assign a solid bottom border that is1px
thick and has the color#757575
. - For the
label
, set absolute positioning and the coordinatetop: -36px
.
Comments