Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:20
What would you like to do?
CSS Specificity & Inheritance Activity
<h1>This is a CSS Specificity Exercise</h1>
<header class="header-home">
<div id="navbar">
<ul class="navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">About Me</a></li>
<li><a href="#">Contact</a></li>
h1 {
font-family: sans-serif;
header a {
color: black;
font: 1.4em sans-serif;
text-decoration: none;
/* Calculate the Specificity of the CSS Selectors Below */
div#navbar ul.navbar-nav > li > a:hover {
color: green;
header.header-home .navbar-nav > li > a:hover {
color: red;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment