Jump to content

How to link html pages in different folders?


aj123cd

Recommended Posts

How to link html pages in  different folders?

 

This is the file Tree:

-assets( folder)

- css( folder)

      - screen.css

 

-image( folder)

    - site( folder)

      - hello.jpg

 

---hello.html

 

-forums( folder)

  -index.html

 

Now when I try to link css folder styles.css to forms folder index.html

Like this

<link href="../assets/css/screen.css" type="text/css" rel="stylesheet" media="screen" />

It does not work.

 

But if I include web address it working .

<link href="http://mysite.com/assets/css/screen.css" type="text/css" rel="stylesheet"  media="screen" />

 

Can you please advise me?

1. Is it ok to do like this?

2. Is there any better method.

3.

in advance thank you for all your help and hoping you could able to understand my problem.

 

Link to comment
Share on other sites

In your structure you have style.css in the path you have screen.css.  Seems like a silly question but are you using the correct file name? if all else fails use Dreamweaver to link it.

I am using Dreamweaver link it.but it not working.

 

Link to comment
Share on other sites

I cannot think of anything that would fix it, if your href pointer is correct. If all else fails use the URL.

 

To make sure of things I like to start at the HTML file and manually navigate to the CSS file in the window. This will verify the file path for you. You could also try navigating to the CSS file from the forums directory using the command line. This will show you the exact file path to use.

 

Hope this gets resolved

Link to comment
Share on other sites

  • 1 month later...

use Dreamweaver for some good examples

No, just no. Not only is this bad advice, as I've yet to see any good code produced by WYSIWYG-editors, but it has nothing to do with the question the OP asked.

 

basic way of getting used html fundamentals. Dreamweaver helped me to understand how <link href= works.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.