Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

CSS problem when working with Foundation

I am creating my own take on the prototype in the Foundation course, but I've come unstuck on what seems a very basic issue. Trying to apply my own styles, my my-styles.css doesn't seem to want to link. I've checked the location of the files, tried a margin left etc and can't get it to apply the styles. My only thought is that Foundation.css is overwriting, but can anyone help?

For CSS I have:

.panel {
    margin: 70px;
}

For HTML I have:

<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Blooming Big Data</title>
    <link href="css/my-styles.css" rel="stylesheet" type="text/css" media="screen"/>
    <link href="css/foundation.css" rel="stylesheet" media="screen"/>
    <script src="js/modernizr.js"></script>
  </head>
  <body>
<!--- Top Bar -->
<div class="contain-to-grid fixed">
  <nav class="top-bar">
    <ul class="title-area">
      <li class="name">
        <h1>
          <a href="#">Blooming Big Data</a>
        </h1>
      </li>
      <li class="toggle-topbar menu-icon">
        <a href="#"><span>Menu</span></a>
      </li>
    </ul>
  <section class="top-bar-section"> 
    <ul class="right">
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Tools</a></li>
      <li><a href="#">Sign Up</a></li>
    </ul>
  </section>
  </nav>
</div>
<!--- End Top Bar -->
<!--- Headline content -->
<div class="row panel">
  <div class="large-12 columns">
    <h1>This site is dedicated to you.</h1>
    <p class="lead">Yes, you, who loves wrangling with ever-increasing amounts of data but who just every so often feels the need to scream about it.</p>
    <p>
      <a href="#">Sign Up For <em>DOWN IN THE DATA DUMPS</em></a> 
    </p>
  </div>
</div>
<!--- End Headline content -->
</body>

2 Answers

Rookie, rookie error. Cascading Style Sheets. My-styles.css after foundation.css. (Mod can delete)

James Barnett
James Barnett
39,199 Points

Nice job figuring out your own issue. Rock on :guitar:. Instead of deleting this thread we can leave it so the other's who have the same issue can learn from what you wrote here.

Sander de Wijs
PLUS
Sander de Wijs
Courses Plus Student 22,267 Points

You can also @import foundation.css at the top of the my-styles.css stylesheet. This way you only have to include my-styles.css in the head section.