Jump to content

Linking to style sheets etc


Jonnym53

Recommended Posts

Hi. I'm just looking for clarification on something.I have a page which I uploaded to a folder on a server. The page has associated with it a style sheet (CSS) and other files. Currently I believe the code in the page is looking for the associated items in the wrong place as it is coded thus:<link href="index_files/style.css" rel="stylesheet" type="text/css"><script src="index_files/functions.js" language="javascript"></script>the folder these items are now placed in is a totally different place than the addresses aboveas they are in www.canwork-fromhome.com/Cash-in (the 'Cash-in' part is the holding folder)I have the style sheet and the functions.js in the same folder but the index page does notfind them addressed in the current way.I'm not sure how to write the address in after the"href=" to allow the code in the index page to find the code in the style sheet and fuctions.jsCan anyone point me in the right direction?ThanksJohn M.

Link to comment
Share on other sites

it sounds like you need to make a folder called index_files inside the Cash-in folder, and move style.css and functions.css inside it.

Link to comment
Share on other sites

Hi again. I did as suggested and made the folder, added the files to it and I still get the white page with black test and no functionality.It's as though the code on the page is still looking for the code in it's original place rather than the code in the folder in it's new location.The original page was generated from a package which has a numerous amount of files and folders, all contained with the index, I think it would be difficult to copy the right files to make this work properly as I don't altogether know which files are connected to which. There is a mix of PHP, HTML and CSS and it does work but it seems the page code is not easily transportable, somehow.Not sure how to approach this further.Any suggestions?ThanksJ.M.

Link to comment
Share on other sites

Would that be similar to link to the functions.js?I tried the code you suggested above and the page still looks the same, no color or design. This is really awkward.If you want to get into the page held on the server to see what is really going on let me know.ThanksJ.M.

Link to comment
Share on other sites

javascript link should be<script type="text/javascript" src="myjavascriptfilename.js"></script>'language="javascript"' is never used css as shown<link rel="stylesheet" type="text/css" href="index_files/style.css"> I should clear the cache/history, these are the correct way of linking to these files, the css you had before would not be recognised, and your page would appear with no styling at all. Once the history is cleared, try again, and make sure the path to these files are correct.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi again. I need a little help as I did as instructed in recent posts in this string but the web page does not function. I added the function.js file to the folder index_files and have checked the code in the page against the code in the original page this one is supposed to mirror. The code is exactly the same but still the page function is not active. It's supposed to do something after you enter your name and email etc but I get no response.Is there something else I need to consider, something else I need to add or implement that will make this function as it should.The original page is on my PC at home and the original files for the auto responder are on a remote server so I would not imagine this is a distance thing, maybe something in the code points to a problem I'm not aware of.Please help as I just don't know what is wrong.ThanksJ.M.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...