0

Working on a project and I currently have this:

<!DOCTYPE html>
  <html>
    <head>
       <title>Jams</title>
       <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,800,600,700,300">
       <link rel="stylesheet" type="text/css" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
       <link rel="stylesheet" type="text/css" href="styles/normalize.css/normalize.css">
       <link rel="stylesheet" type="text/css" href="styles/main.css">
    </head>

My directory is

jams  
|---- musicplayer[index.html]  
|---- styles  
|     |---- main.css  
|     |---- normalize.css(folder)  
|     |     |---- normalize.css(file)

Sorry if the directory might seem confusing but it mainly states that jams is the parent folder and the rest of the folder are inside, with the brackets being the files inside the folders. The only exception is normalize.css where that's a folder inside of styles, and inside of the normalize.css folder is a normalize.css file.

7
  • 1
    Have you tried prepending a / meaning relative to the website root? Commented Feb 4, 2017 at 8:50
  • stackoverflow.com/questions/5713295/… Commented Feb 4, 2017 at 8:52
  • normalize.css folder is under styles folder? Commented Feb 4, 2017 at 8:56
  • The code you have should work fine based on your description of the structure. Use the developer tools in your browser. Check the console for errors. Check the Network tab to see what the request actually got back (e.g. maybe you had a permissions error) Commented Feb 4, 2017 at 8:56
  • @s.k.Soni yes it is Commented Feb 4, 2017 at 9:02

2 Answers 2

1

In the inspector window, right click on the stylesheet link and select open in new tab

From there you will be able to see the full url of where the page was trying to pull your CSS from. That should give you a better idea of what you need to do to fix it.

Also, I would try adding ./ to the beginning of the href.   i.e. href="./styles/main.css"

Sign up to request clarification or add additional context in comments.

Comments

1

edit the line

href="styles/normalize.css/normalize.css and href="styles/main.css

replace this two line with

href="./styles/normalize.css/normalize.css" and href="./styles/main.css"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.