Chris
Chris

Reputation: 11

my CSS style sheet is not linking to my html

I'm trying to link my css style sheet to my html file using the code

<link ref="stylesheet" href="../landing/css/stylesheet.css" type="text/css"/>

I have checked my directory link and when command clicking on the /landing/css part it takes me to my CSS file

However when I open the file in my browser to preview I cant see any of my CSS styling applying to the file

Thanks for any help in advance

html code

CSS code

browser view when opening file

Upvotes: 0

Views: 99

Answers (4)

ElyakimZakay
ElyakimZakay

Reputation: 24

From what I observe , you have used double dots in your "href"

You need to link it like this:

<link ref="stylesheet" href="./css/stylesheet.css" type="text/css"/>

Upvotes: 0

Karan Agrawal
Karan Agrawal

Reputation: 69

Change the value for href attribute to: "css/stylesheet.css" Remove the earlier part as it takes you out of the folder and then back again in. See if this helps, else reply here further

Upvotes: 2

bhanu prakash
bhanu prakash

Reputation: 19

May be you can try this might helpful.

<link href="css/stylesheet.css" type="text/css"/>

Upvotes: 0

user14118101
user14118101

Reputation:

I am pretty sure that you just have to do css/stylesheet.css. Not sure what the landing part is about

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

Upvotes: 0

Related Questions