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
Christopher Meja
Courses Plus Student 181 Pointsthe images and css to add to HTML ,
images and css files not uploading to my workspace, i tried using my own images but they did not work either although filws uploaded, names of files are exactly as in code
Christopher Meja
Courses Plus Student 181 Pointsmy code looks ok, here it is, but image is not displaying, name of image is correct as in image folder <li> <a href="img/SupermacksMenu.jpg"> <img src="img/SupermacksMenu.jpg" alt=""> <p>SuperMacks Menus.</p> </a> </li>
Jacob Mishkin
23,118 Pointsyou are working in workspaces correct?
Jacob Mishkin
23,118 Pointsif you can post your code that would be great. This way we can see what the issues are. you are having two issues. so far as CSS goes, take a look at the answer below and make sure you are linking your CSS folder to the HTML file.
second, look at the img folder that you created. make sure you are using the correct pathway, so the HTML and access your img folder.
3 Answers
sizwengubane
15,244 PointsHere is how you link CSS files to your html...make sure to include the code inside your 'head' section..not inside the body <blockquotes>
//example ---> imagine you have a css file called 'style.css' inside the 'css' folder
<link rel="stylesheet" href="css/style.css">
</blockquotes>
If you are trying to add images to your html do like this <blockquotes>
<img src="img/image.jpg" alt="an image">
</blockquotes> Please be careful of the location of the images and css files... Hope this helps..mark my answer as the best
sizwengubane
15,244 Pointstake a look at my answer and see if it helps
Christopher Meja
Courses Plus Student 181 Pointsi havent added css yet as i could not drop the file to my work space, for now i want the pictures to display, here is my code <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Supermacks</title> <link rel="stylesheet" href="css/normal.css"> </head> <body> <header> <a href="index.html"> <h1>All You Can Eat</h1> <h2>Choose from Menu</h2> </a> <nav> <ul> <li><a href="supermacksmenu.html">Supermacks</a></li> <li><a href="breakfast.html">Break Fast</a></li> <li><a href="burgermeals.html">Burger Meal</a></li> <li><a href="snackbox.html">Snack Box</a></li> <li><a href="fries.html">Tyco Fries</a></li> </ul> </nav> </header> <section> <ul> <li> <a href="img/SupermacksMenu.jpg"> <img src="img/SupermacksMenu.jpg" alt=""> <p>SuperMacks Menus.</p> </a> </li> <li> <a href="img/Breakfast.jpg"> <img src="img/Breakfastu.jpg" alt=""> <p>Breakfast Meals.</p> </a> </li> <li> <a href="img/BurgerMeal.jpg"> <img src="img/BurgerMeal.jpg" alt=""> <p>Burger Meals.</p> </a> </li> <li> <a href="img/SnackBox.jpg"> <img src="img/SnackBox.jpg" alt=""> <p>Snackbox Meals.</p> </a> </li> </ul> </section> <footer> <p>© 2015 used car parts.</p> </footer> </body> </html>
Jacob Mishkin
23,118 PointsIf you can get notepad++ or what I use sublime text up and running go with that. If for now you are more comfortable using workspaces, First I would check to make sure all the styles you are using is new the normal.css file inside the CSS folder. It also looks like you do not have a head tag. in HTML5 you can omit this by using a body tag which you do not have in your HTML. at the top of your HTML it should look like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Supermacks</title>
<link rel="stylesheet" href="css/normal.css">
</head>
<body>
//code goes here in between the body tags.
</body>
</html>
let me know if you got it to work, if not lets try something else..
sizwengubane
15,244 PointsThen just download the project files and to it manually bro..its easy even i dont use workspacxes..i just download the project files and do the coding in notepad++
Christopher Meja
Courses Plus Student 181 Pointshow do i run it in notepad, like the way we do in workspace to preview my work
sizwengubane
15,244 Pointsjust download and install notepad, create a new document and save the file with the required extension such as '.html' for html files or '.css' for css files. Then u can preview then in the browser by just double clicking on them...simple stuff bro
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 Pointscheck to see if you are using the correct file pathway. something like this:
<img src="img/photo_1.png" alt="my image">if you need more help please let us know.