CSS CSS Layout Basics Getting Started with CSS Layout Creating a Sticky Footer

Binyamin Grobman
Binyamin Grobman
9,241 Points

the browser is not loading the css

The browser is not loading the styles in the css files.

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Best City Guide</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="wrap"> <header class="main-header"> <div class="container"> <h1 class="name"><a href="#">Best City Guide</a></h1> <ul class="main-nav"> <li><a href="#">ice cream</a></li> <li><a href="#">donuts</a></li> <li><a href="#">tea</a></li> <li><a href="#">coffee</a></li> </ul> </div> </header>

<div class="container">
    <p>Everything in this city is worth waiting in line for.</p>
    <p>Cupcake ipsum dolor sit. Amet chocolate cake gummies jelly beans candy bonbon brownie candy. Gingerbread powder muffin. Icing cotton candy. Croissant icing pie ice cream brownie I love cheesecake cookie. Pastry chocolate pastry jelly croissant.</p>
    <p>Cake sesame snaps sweet tart candy canes tiramisu I love oat cake chocolate bar. Jelly beans pastry brownie sugar plum pastry bear claw tiramisu tootsie roll. Tootsie roll wafer I love chocolate donuts.</p>


<footer class="main-footer">
    <span>&copy;2015 Residents of The Best City Ever.</span>


</body> </html>

/* ================================= Base Element Styles ==================================== */

  • { box-sizing: border-box; }

body { line-height: 1.6; color: #3a3a3a; }

p:last-child { margin-bottom: 0; }

a { color: #fff; text-decoration: none; } footer { position: fixed; /* always stay where I put you on the screen / bottom: 0; / I'm putting you at the bottom with no space in between / width: 100%; / fill the width of your containing element (body) */

/* ================================= Base Layout Styles ==================================== */

/* ---- Navigation ---- */

.name { margin: 0; }

/* ---- Layout Containers ---- */

.container { padding-left: 1em; padding-right: 1em; }

.main-header { padding: 1.5em 0; background: #3acec2; }

.main-footer { text-align: center; padding: 2em 0; background: #d9e4ea; }

/* ================================= Media Queries ==================================== */

@media (min-width: 769px) {

.container { width: 70%; max-width: 1000px; margin: 0 auto; }


3 Answers

Brian Ball
Brian Ball
Treehouse Project Reviewer

Check your post for fomatting the code. It's hard to see what code is which.

5,563 Points

Check if you have the style.css in the directory you are providing.

The directory you use is css/style.css. Check if there is a style.css file.

Have fun ;)