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

Forest Hoy
Forest Hoy
1,303 Points

Workspaces hyperlinks aren't working

I am currently working on Style New Pages. When I went to click on another link in my header I found that it didn't work at all, intriguingly none of the links worked, not the about, contact or index link(which is the page I was on to start with.) I get a 404 not found error if I click on any of these links and here is the code that I'm working with.


<!DOCTYPE html> <html> <head> <meta charset=”utf-8”> <title>Forest Hoy | Writer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,700,700italic,900|Montserrat' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href=”index.html” id="logo"> <h1>Forest Hoy</h1> <h2>Writer</h2> </a> <nav> <ul> <li><a href=”index.html” class="selected"> Portfolio</a></li> <li><a href=”about.html”>About</a></li> <li><a href=”Contact.html”>Contact</a></li> </ul> </nav> </header>


2 Answers

Michael Afanasiev
PLUS
Michael Afanasiev
Courses Plus Student 15,596 Points

Hi Forest,

Do you have the pages contact.html about.html in your workspace? These are relative links and if there are no such files in your workspace/directory you'll receive an error.

Could you also make a snapshot of your workspace and post the link here?

You can find the snapshot in the upper right corner of the workspace like so: Snapshot

Forest Hoy
Forest Hoy
1,303 Points

Sorry the code I copied wasn't the way I wanted it to look.

Here's the snapshot,

https://w.trhou.se/skxot891d8

Michael Afanasiev
Michael Afanasiev
Courses Plus Student 15,596 Points

Hi Forest,

I forked your workspace and I was able to recreate the problem. I am not sure why this happens, however I was able to resolve the issue but deleting your anchor tags and writing them on my own (with exactly the same markup). Once I replaced them, the hyperlinks seem to work.

You can try this as a temporary solution. In the meantime, I will investigate further.

Sergey Podgornyy
Sergey Podgornyy
20,660 Points

Make sure the files are in the same directory and called as in the link

And you didn't close your "anchor" tag:

<a href=”index.html” id="logo">
  <h1>Forest Hoy</h1> 
  <h2>Writer</h2>
</a>