Ive been having problems getting this code right. My \"nav\" element for some re
ID: 3542850 • Letter: I
Question
Ive been having problems getting this code right. My "nav" element for some reason isnt working, also the w3 validator said theres an error and it says "Element style is missing required attribute scoped" and I have no idea what that means. And lastly I dont know what to use to indent the lines under <li> so I just used <li> again just so it doesnt show up as an error again but I need to get this fixed. Thanks for any help.
<!DOCTYPE html>
<html lang="en">
<head>
<title> Assignment 3 - Jordan Gramling </title>
<meta charset="utf-8">
</head>
<body>
<style>
body {background-color: #6699ff;
color: #d5e3ff;
font-family: Arial, Verdana, sans-serif;
}
h1 {background-color: #6699ff;
color: #003366;
line-height: 200%;
font-family: serif;
}
.nav {font-style: bold;
}
.category {background-color: #6699ff;
color: #003366;
font-style: bold;
font-size: 1.1em;
}
#footer {font-size: .70em;
font-style: italic;
}
</style>
<h1> Fish Creek Animal Hospital </h1>
<div class="nav"> <a href="index.css.html">Home</a> <a href="services.css.html">Services</a> <a href="askvet.html">Ask the Vet</a> <a href="contact.html">Contact</a></div>
<ul>
<li class="category"><span>Medical Services</span></li>
<li>We offer state-of-the-art equipment and technology</li>
<li class="category"><span>Surgical Services</span></li>
<li>Full range of surgical procedures including orthopaedics and emergency</li>
<li class="category"><span>Dental Care</span></li>
<li>A dental exam can determine whether your pet needs preventive dental care such as scaling and polishing</li>
<li class="category"><span>House Call</span></li>
<li>The elderly, physically challenged, and multiple pet households often find our in-home veterinary service helpful and convenient</li>
<li class="category"><span>Emergencies</span></li>
<li>At least one of our doctors is on call every day and night</li>
</ul>
<div>
<footer id="footer"> Copyright © 2013 Fish Creek Animal Hospital
<br> <a href="firstname@<a href="mailto:firstname@lastnight.com">lastname.com">firstname@lastnight.com</a></footer>
</div>
</body>
</html>
Explanation / Answer
1) its not font-style but its font-weight
.nav{ font-weight:bold;}
2) To get indentation use another list
<li class="category"><span>Medical Services</span></li>
<ul><li>We offer state-of-the-art equipment and technology</li></ul>
<li class="category"><span>Surgical Services</span></li>
<ul><li>Full range of surgical procedures including orthopaedics and emergency</li></ul>
<li class="category"><span>Dental Care</span></li>
<ul><li>A dental exam can determine whether your pet needs preventive dental care such as scaling and polishing</li></ul>
<li class="category"><span>House Call</span></li>
<ul><li>The elderly, physically challenged, and multiple pet households often find our in-home veterinary service helpful and convenient</li></ul>
<li class="category"><span>Emergencies</span></li>
<ul><li>At least one of our doctors is on call every day and night</li></ul>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.