Unit 2 Lesson 13 - Stylesheet not linking

I have a few students who are having an issue with a stylesheet not linking to his/her html page.

This first student has 3 stylesheets (1 for each page). 2 of them work, but the 3rd one does not. The html page is cookies.html and the stylesheet is cookies.css.

The other student cannot get a stylesheet to link to his page at all. He is using the basketball.html and bballstyle.css pages. https://studio.code.org/s/csd2-2018/stage/13/puzzle/11?section_id=1806257&user_id=42414987

I have deleted the stylesheets and links and then re-created them, but it still does not fix it.

Thank you.

On line 4 change “cookiesstyle” to “style sheet”. This should be used no matter the name of the file.

I can’t help you with the other because when I clicked the link it brought me to my lesson. If you can link his project I can look at it.

2 Likes

@jcz

Just checking in - did what @jadams1 mention work for all of them? Let us know and if needed, post a link to the shared website. Thanks!

Brad

I am having the same issue. Even though the student provided the link on the index to the css stylesheet, it doesn’t work. Help please!

Can you post a link to your student’s file? That will help us to troubleshoot it.

Mike

Hi everyone,

To get help as efficiently as possible, please fill out the following in any debugging requests:

  1. Link to your project: click the “Share” button at the top of the page and paste the link it produces into your post.
  2. Are there any particular steps that cause the error?
  3. What did you expect the program to do?
  4. What did it do instead?

The box should auto-populate with these fields when you submit a post in the Debugging category; if not, please let us know so that we can fix that for you.

Thanks!

–Michael K.

Hi everyone.
Thanks for your help.
Here is the link https://codeprojects.org/HRwn0hxLSaQCG1LUEbUZOnVJS2jP0gP3Jwv-VtoPRHo

May the problem be that his stylesheet has a different name? He changed it from the default one that is provided when you first create the Css file on the codelab.

Thank you so much.

On his stylesheet line, he has the following code:

<link rel="stylesheet1" href="stylesheet1.css">

It’s ok to change the name of the stylesheet (stylesheet1.css) as long as the file is named the same as the href attribute, however, in the “rel” attribute, it has to be called “stylesheet”. So if he changes his code to the following, I’m guessing it will work.

<link rel="stylesheet" href="stylesheet1.css">

Hope this helps, let us know!

Mike

Ok will try and let you know. I posted a comment with this solution on the feedback section.
Thank you so much!