External Exam Download Resources Web Applications Games Recycle Bin

CSS Grid

<!DOCTYPE html>
<html>
  <head>
      <title>links</title>
      <link rel="stylesheet" type="text/css" href="links.css">
  </head>
  <body>

    <div id='nav1'>
      <a href="somewhere.html">link to somewhere</a>
      <a href="elsewhere.html">somewhere else</a>
    </div>

    <div id='nav2' style="clear: left;">
      <a href="somewhere.html">link to somewhere</a>
      <a href="elsewhere.html">somewhere else</a>
    </div>
      
  </body>
</html>

links.css

#nav1 a {
  width: 150px;
  height: 25px;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  float: left;
  padding-left: 30px;
  padding-top: 30px;
  border: 1px solid black;
  background-color: salmon;
  text-decoration: none;
}

#nav1 a:hover {
  background-color: yellow;
}

#nav2 a {
  display: block;
  width: 150px;
  height: 25px;
  padding-left: 30px;
  padding-top: 30px;
  border: 1px solid black;
  background-color: blanchedalmond;
  text-decoration: none;
}

#nav2 a:hover {
  background-color: yellow;
}