0

How to go back to the directory in html. Firstly I will show by folders.

My website
├ Pages (folder name)
│  └ about-us.html
├ Css (folder name)
│  └ Style.css
└ index.html

Let us assume that we are working on about-us.html. Now I want to connect style.css to about-us.html. If anyone know the answer thanks in advance.

Paul
  • 4,160
  • 3
  • 30
  • 56

2 Answers2

1

To go from about-us.html to style.css:

Use this to go back ../

Try this:

<link href="../css/style.css" rel="stylesheet" />
Manas Khandelwal
  • 3,790
  • 2
  • 11
  • 24
0

You mean

<link href="../Css/a.Style.css" rel="stylesheet" /> 

in a.about-us.html and

<link href="Css/a.Style.css" rel="stylesheet" /> 

in index.html

You can do absolute in both html files:

<link href="/Pages/Css/a.Style.css" rel="stylesheet" /> 

or if Pages is the root folder:

<link href="/Css/a.Style.css" rel="stylesheet" /> 
mplungjan
  • 169,008
  • 28
  • 173
  • 236