CSS Selectors Practice

 <!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Practice CSS Selectors</title>
    <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Raleway" rel="stylesheet">
    <link href="http://treehouse-code-samples.s3.amazonaws.com/practice-css/styles-selectors.css" rel="stylesheet">
    <link href="selectors.css" rel="stylesheet">
  </head>
  <body>
    <div class="wrapper">   
      <!-- HEADER -->
      <header>
        <!-- LOGO -->
        <img src="logo.png" alt="Bookworm">
        <nav>
          <ul>
            <li><a href="#">About</a></li>
            <li><a href="#">Articles</a></li>
            <li><a href="#">News</a></li>
            <li><a href="#">Get in Touch</a></li>  
          </ul>
        </nav>
      </header>
      
      <img class="main-img" src="main.jpg" alt="books">
      
      <!-- MAIN CONTENT -->
      <main>
        <h1>Latest Articles</h1>
        <article>
          <h3>Quisque Tortor Lacus</h3>
          <p>Morbi quis felis ex. Nulla lacus risus, laoreet tempus ipsum vitae, suscipit maximus est. Curabitur accumsan cursus ullamcorper. Proin tempus quam vel orci pulvinar, non finibus lectus rhoncus... <a href="#">read more &raquo;</a></p>
        </article>
         <article>
          <h3>Suspendisse et Eleifend Metus</h3>
          <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque tortor lacus, blandit vitae lacus ut dui rhoncus, laoreet diam vel, tincidunt... <a href="#">read more &raquo;</a></p>
        </article>       
        <div>
          <div class="list-primary">
            <h2>List of Important Stuff</h2>
            <ul>
              <li>Nulla lacus risus, laoreet tempus</li>
              <li>Praesent sit amet auctor sapien sit amet</li>
              <li>Aenean sit amet quam leo etiam</li>  
              <li>Duis eget nulla nec  lobortis habitant</li>          
            </ul>
           </div>
          <div class="subscribe">
            <h3>Stay updated on what I'm reading!</h3>
            <p>Vestibulum <a href="#">erat augue</a>, consequat non tellus ac, posuere scelerisque augue.</p>
            <input type="text" placeholder="Enter email...">
            <input type="submit" value="Signup">
          </div>
        </div>
      </main>
      
      <!-- FOOTER -->
      <footer>
        <span>&copy;2017 Bookworm Blog</span>
      </footer>
    </div>
  </body>
</html>



/* CSS File */
/* ====================================================== 
   Practice CSS Selectors 
========================================================= */
/* Change the color of all list items inside an unordered list */
ul li {
  color: cyan;
}
/* Remove the text decoration from navigation links, and change their color when hovered */
nav a {
  text-decoration: none;
}
nav a:hover {
  color: yellow;
}
/* Create visited and hover styles for all links inside 'main' */
main a:hover {
  color: tomato;
  text-decoration: none;
}
main a:visited {
  color: skyblue;
}
/* 
 Change the background color of the submit button when active.
 Check teacher's notes for resources on this part of the challenge. */
input[type='submit']:active {
  background: pink;
}

/* Give the text field a blue border upon focus.
   Check teacher's notes for resources on this part of the challenge. */
input[type="text"]:focus {
  border: 1px solid #4683af;
}

Comments

Popular posts from this blog

C++: Counting Change Project