aj123cd Posted July 18, 2012 Share Posted July 18, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/ Share on other sites More sharing options...
Jessica Posted July 18, 2012 Share Posted July 18, 2012 Use the full path with the URL. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362448 Share on other sites More sharing options...
cmgweb Posted July 18, 2012 Share Posted July 18, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362451 Share on other sites More sharing options...
aj123cd Posted July 18, 2012 Author Share Posted July 18, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362454 Share on other sites More sharing options...
mikhl Posted July 18, 2012 Share Posted July 18, 2012 Is the forums and assets directories in the same directory. I know it's a silly question, but I thought it worth checking. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362562 Share on other sites More sharing options...
aj123cd Posted July 19, 2012 Author Share Posted July 19, 2012 Is the forums and assets directories in the same directory. I know it's a silly question, but I thought it worth checking. yes thank you for your help. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362660 Share on other sites More sharing options...
mikhl Posted July 19, 2012 Share Posted July 19, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1362661 Share on other sites More sharing options...
beven Posted July 27, 2012 Share Posted July 27, 2012 give full path in href tag Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1364799 Share on other sites More sharing options...
worrall Posted September 10, 2012 Share Posted September 10, 2012 Its so simple whenever you write the <a href line the editor automatically give you an browse option and through that you can give the path of the file. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1376663 Share on other sites More sharing options...
hakimserwa Posted September 15, 2012 Share Posted September 15, 2012 use Dreamweaver for some good examples Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1378160 Share on other sites More sharing options...
Pikachu2000 Posted September 15, 2012 Share Posted September 15, 2012 Use the full path with the URL. give full path in href tag +1 Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1378164 Share on other sites More sharing options...
Christian F. Posted September 15, 2012 Share Posted September 15, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1378178 Share on other sites More sharing options...
hakimserwa Posted September 16, 2012 Share Posted September 16, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1378316 Share on other sites More sharing options...
Christian F. Posted September 16, 2012 Share Posted September 16, 2012 Still not good advice, I'm afraid. For something that basic, I'd go with a HTML tutorial. Or even the HTML spec from W3.org, if you really want all of the details on anchors. Quote Link to comment https://forums.phpfreaks.com/topic/265903-how-to-link-html-pages-in-different-folders/#findComment-1378328 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.