GithubHelp home page GithubHelp logo

thepeej / stylesheets-and-nested-selectors-css-lab-abp-11-17 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from learn-co-students/stylesheets-and-nested-selectors-css-lab-abp-11-17

0.0 1.0 0.0 27 KB

License: Other

Ruby 85.72% HTML 9.11% CSS 5.17%

stylesheets-and-nested-selectors-css-lab-abp-11-17's Introduction

Stylesheets and Nested Selectors with CSS

Objectives

  1. <link> to an external stylesheet style.css from index.html.
  2. Use nested element selectors to style the navigation of the Icebreaker homepage.
  3. Play with borders, heights, padding, margin, inline display, and floats.

Instructions

We're going to style the navigation of our Icebreakers site. The goal is to move the h3 to the left using floats and the nav to the right. We're also going to add some other styles like a bottom border and some colors. By the end of this lab the navigation in index.html will look like:

Navigation

Code your styles in style.css and include it in index.html with a <link> tag with an href attribute and a rel attribute of value stylesheet.

You have to use the specific selectors described below to style the navigation.

The <header>

Give the header element a height of 100px and a bottom-border of 1px solid #cccccc

The <nav>

Select the nav element by finding it nested under the header (hint - parent_element child_element {}). Float the nav to the right.

The <nav> <ul>

Select the ul element by finding it nested under the nav. Reset the ul's padding to 0 and give it a top margin of 40px and reset all other margins to 0. You can use a shorthand margin property for this - margin: TOP RIGHT BOTTOM LEFT

The <li>s inside of <ul> inside of <nav>

Select the lis with a triple nested selector searching for all lis inside a ul inside a nav. Set the li display property to inline and add a right margin of 10px

The <a>s inside of <nav>

Select all as inside a nav with a nested selector. Remove their text-decoration, give them a color of #007bff and a font-size of 18px

The <h3> inside the <header>

Select the h3 inside header with a nested selector. Float the h3 to the left and make the font-size 30px.

The <a> inside <h3> inside the <header>

Select the a with a tripple nested selector and style it with no text-decoration and a color of #868e96.

Resources

stylesheets-and-nested-selectors-css-lab-abp-11-17's People

Contributors

aviflombaum avatar thepeej avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.