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.

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

css issue

I have been able to figure out most of my problems up until now. For some reason when I add in the css files grid and normalize. They do nothing. I have added the container class to it and it changes nothing when it clearly shows the page changing as the video continues on.

I am on a pc and the video is showing it as a mac. So I have to change my pathing otherwise it will not show images and the like. Any fellow pc users out there want to help me figure this out!

Thank you for your time. I can show the code if need be just ask!

9 Answers

Richmond Lauman
Richmond Lauman
28,793 Points

I am not sure if this will be a fix for the problem, but I would try changing the paths to your stylesheets from the absolute paths you have now to relative paths. For example:

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

If the problem still persists then you need to look in the normalize.css code for what might be wrong.

Richmond Lauman
Richmond Lauman
28,793 Points

Seeing the code would be helpful, if the most likely or obvious is not the problem. That being... did you refresh the page after normalizing? If you do not refresh or reload the page you may be viewing the page using cached files that existed before the styles were normalized.

Ok so posting the entire code doesn't do so well. I will post sections of what is giving me trouble.

<link rel="stylesheet" href="C:/Users/Amanada/Desktop/Programming projects/css/normalize.css" type="text/css" media="screen">

<link rel="stylesheet" href="C:/Users/Amanada/Desktop/Programming projects/css/grid.css" type="text/css" media="screen">

Above is supposed to be the pathing for the css files. I have tried to mess with them. this has worked with the imgs before but for some reason does not work with the css. I know / is supposed to be . Was just trying something and haven't changed it back yet. This is the entire code for the container class that it had me do. I do refresh the page every time I save the file to make sure my work is correct.

Ok so it is not letting me post the code. I forget how to add screen shots.

Richmond Lauman
Richmond Lauman
28,793 Points

Hi Darryl.. Below your comment box is a link to the markdown cheatsheet. Click on it and look for the markdown syntax that you can use to have your code display as code when you post it.The relevent CSS code would be good to see as well.

<link rel="stylesheet" href="C:/Users/Amanada/Desktop/Programming projects/css/normalize.css" type="text/css" media="screen"> <link rel="stylesheet" href="C:/Users/Amanada/Desktop/Programming projects/css/grid.css" type="text/css" media="screen">

Above is suppose to be the path for the two css files I am to use for building the mock website.

What other code do you need to see?

Yea i did it that way originally but that is a path style for mac. I am on a pc so that pathing doesn't work. The normalize code is directly from this site. Doing the track for website basics. If it is the css files themsleves then I have no idea what to even look for yet.

Richmond Lauman
Richmond Lauman
28,793 Points

css/normalize.css is a relative path and not specific to a mac or a pc. It is just a path relative to the root folder your site resides in and should work on a mac or a pc. or any hosting server as long as your web page is located in the root folder and all sub directories like the css folder are located within the root folder. Are all of your site files and sub directories located int the Programming projects directory on your desk top? If they are then the folder Programming projects is your root directory and the the relative paths should work. If the relative paths are not working then there is a problem with how you are organizing the site files.

Ill look into that thanks.