body {
  background: aliceblue;
}

nav {
  background: white;
  margin: 0 -0.5rem;
}

nav::after {
  content: "";
  display: block;
  clear: both;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  float: left;
}

nav a {
  display: block;
  padding: 1rem;
  text-decoration: none;
}

nav li:hover {
  background: rgb(240, 240, 240);
}

nav a:active {
  color: #cce;
}

li.contains ul {
  display: none;
}

li.contains:hover ul {
  background: white;
  display: block;
  position: absolute;
}

li.contains li {
  float: none;
  font-size: 0.9rem;
}