For the small practice exercise in my CSS learning journey, I'm struggling to style a list as my instructor has shown. I've attempted several times but can't seem to achieve the desired outcome.
ul#menu li {
display: block;
border-block-end: 0px;
background-color: #66c;
margin: 2px;
list-style-type: none;
padding-left: 5px;
padding-top: 2px;
}
#menu {
background-color: #64a;
}
#menu a {
color: white;
text-decoration: none;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8>
<title>Sample Menu Page</title>
<link rel="stylesheet" title="Q1" href="style2.css" />
</head>
<body>
<h1>Sample Menu Page</h1>
<ul id="menu">
<li><a href="one.html">Page One</a></li>
<li class="current"><a href="two.html">Page Two</a></li>
<li><a href="three.html">Page Three</a></li>
<li><a href="four.html">Page Four</a></li>
<li><a href="five.html">Page Five</a></li>
</ul>
<div id="main">
<h2 id="first">First Section</h2>
<p>This is the first part of the real content of the page.</p>
<p>This exercise is mostly about:</p>
<ul>
<li><abbr title="Cascading StyleSheets">CSS</abbr></li>
<li>geese</li>
</ul>
<p>Actually, there isn't so much about geese. I just wanted to use a <code><ul></code> there.</p>
<h2 id="next">Next Section</h2>
<p>I'm really running out of stuff to say here. Oh well, fall back to old standards, I guess…</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</body>
</html>
I've scoured the web for similar questions and consulted various CSS guides without success.
ul#menu li {
display: block;
border-block-end: 0px;
background-color: #66c;
margin: 2px;
list-style-type: none;
padding-left: 5px;
padding-top: 2px;
}
#menu {
background-color: #64a;
}
#menu a {
color: white;
text-decoration: none;
}
Expected result: