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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.