Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Build a Simple Website Creating a Website Structure Working with Grids

Viktoria Couch
Viktoria Couch
2,296 Points

CSS is not working

I am currently working on Build a simple website project and after applying the grid.css file it does not show any changes on my site preview. I checked my codes and could not find any issues with it. Please, advise.

 <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
 <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
</head>
<body>
  <div class="container clearfix">
        <div class="grid_4">
        <img src="img/logo.gif" alt="Smells Like Bakin'">
      </div> 

Have you linked it correctly? For example have you put the css file into a folder and not linked? Could you paste the link?

Viktoria Couch
Viktoria Couch
2,296 Points
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
  <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">

6 Answers

If links work the only thing i can think of is: Check your css class--->#

so you got at css

# grid_4{}

#container clearfix{}

Ismael Uriarte
Ismael Uriarte
10,403 Points

I see you have two Div's, but only one closed Div.

Viktoria Couch
Viktoria Couch
2,296 Points

Thank you everybody for a quick response, I found the issue and fixed it!

This is wonderful! Might we know what went wrong?

Viktoria Couch
Viktoria Couch
2,296 Points

The mistake was related to css file itself, it was corrupted, after I deleted the file from the project and then uploaded it again it started working. Sorry that I did not respond soon enough.

Marcus, im sorry my bad, victoria refer to the problem marcus pointed out o my code, im truly sorry i was ina bit of rush when i typed the answer.

Thank you marcus!

<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
  <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">

<!--- Try this instead: --->

<link rel="stylesheet" type="text/css" href="css/normalize.css media="screen" >
<link rel="stylesheet" type="text/css" href="css/grid.css media="screen" >

<!--- OR try this -->
<link rel="stylesheet" type="text/css" href="/css/normalize.css media="screen" >
<link rel="stylesheet" type="text/css" href="/css/grid.css media="screen" >

Zagros, your solutions are very ill made and will not work. You are missing quotes from the href property on both of the solutions given here which would not allow the css to be linked correctly.