Sidebar - I
Lesson 6 of 13 in Coddy's Sidebar | Front-end Project course.
Challenge
EasyFor 'sidebar' class, set the following properties:
1. Set the width to 250 pixels and the height to 100%.
2. Set the background color of your choice.
3. Set the position to fixed.
4. Set box-sizing to border-box.
Try it yourself
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<title>Sidebar</title>
</head>
<body>
<button id="openSidebarBtn">Open</button>
<div id="sidebar" class="sidebar">
<button id="closeSidebarBtn">Close</button>
<p>Home</p>
<p>About</p>
<p>Services</p>
<p>Contact</p>
</div>
<script src="script.js"></script>
</body>
</html>All lessons in Sidebar | Front-end Project
1Introduction
What you will build?