Update: Thanks to help from literally everyone below, I resolved my problem! The site was completely done and ready to go. Time to upload it... but my client is using Office Live, aka a terrible webhosting service that won't even let me use my own FTP program.
I'm not 100% sure why my client is insisting on using Office Live, but I'm not going to ask him to switch (yet?) - it's kind of my job to
make it work. It's been a bitch to simply connect to. I've spent 6 hours troubleshooting connection problems to the server because I can't use FTP software, renaming everything to root to default.htm instead of index.htm - basically working around Office Live since it gives me no creative freedom.
I couldn't even use my Macbook because I have to use a Windows computer, my regular Windows computer wouldn't connect, but I finally had it working. I had to rename my index.htm to default.htm in order for this website to work. Office Live has been a horrible experience so far.
To cut to the chase, My .css sheets are just, well, failing to load [fixed!]. They're all there, they all operate on a mirror site, but I have no freaking clue what's going on. What's the deal with Office Live, does anyone have any experience with it? I've spent a long time working on the site I built. The product is ready to go. The provider my client use isn't very helpful. What do I do? Is there a fix, or is it time to suggest a switch to another (free?) provider?
So I have a website with four headers in the Navigation Menu:
1.) Home
2.) About Us
3.) Our Services
4.) Contact Us
The "Our Services" header has a drop down menu, and I want the text to link to the "Our Services" ([xxxx]/services/default.html) page.
Here's the problem. The code works just perfectly on the "About Us" and "Our Services" pages, but it doesn't work on the "Home" or "Contact Us" page, although it is literally the same. The problem is that there is a missing folder.
It works with this path: file:///Users/[me]/[website]/Alpha%20Version/
AccuKeep%20Site%20Website/services/default.htm
It fails with this path: file:///Users/[me]/[website]/Alpha%20Version/services/default.htm
The limed area is the folder that's mysteriously missing even though the code is the same!
This is from the "Home" [default.htm] page:
<div class="menu_item_18" id="3_1"><a href="../services/default.htm" class="menu_link_15" onmouseover="showMenu('3_1')" onmouseout="leaveMenu()">Basic Bookkeeping</a></div>
This is the same line from the "About Us" [about.htm] page:
<div class="menu_item_18" id="3_1"><a href="../services/default.htm" class="menu_link_15" onmouseover="showMenu('3_1')" onmouseout="leaveMenu()">Basic Bookkeeping</a></div>
As you can see, it's exactly the same, so I don't know why there's a missing path.
Help!!
Thanks in advance!
Posts
For example, if your four pages were laid at as follows:
1) Home - /default.htm
2) About Us - /about/default.htm
3) Services - /services/default.htm
4) Contact Us - /contact.htm
In this scenario, the path "../services/default.htm" will work for #2 and #3, but for #1 and #4 it will fail, because it would have to be just "services/default.htm" instead.
The much-preferred way to avoid this problem is to use absolute URLs instead. (That is, every page would have a link to "/services/default.htm", without any periods in front.) However, you would have to test your website on the server if you make this change, because absolute URLs don't work if you're testing your website directly using file:///.
as vrtra theory says, its probably a canonization and relative path problem. ../ will look for the resource one folder deeper *no matter where the file actually lives*. so if you are at home, it goes down 1 level. if you are 12 folders deep, it goes down 1 level. you should always refer to the root of the site as much as possible, ie "/path/to/file.html" will refer to somedomain.com/path/to/file.html no matter where you are.
you might want to try <base href> if you are dealing with static files, or look up how to use the path directives of a dynamic language, or use apache to keep things friendly.
*edit - also, this is not a div or a class problem, this is a path problem. the divs are actually immaterial of your problem, and can be ignored for the purpose of solving this.
I now have an even bigger problem. The site is ready to go. I upload it... and the .css sheets won't function [fixed! thanks Resilient!]. I'm pretty sure it's an Office Live problem, because I can have it working on a mirror site. Does anyone have any experience with Office Live? It's... horrible.
If it were possible, I'd never support Microsoft again, and I'm certainly putting it in my contract with any future products that I have to be able to use my own FTP program and I won't work with Office Live.
It look like the /support directory is trying to be a secure directory when it shouldn't be. So there is something odd going on with security settings or permissions.
I discussed the situation with my client and he's looking at different free hosting options (speaking of which, if anyone has any suggestions, I'm taking them).
Also if this is a business website perhaps they should look at paying for their hosting. :P
Seguer, I'm fine right now. It's not laid out how I'd like it laid out if it were my site (i.e. Drop down menus linking to the same page makes it feel broken - but I think he just wanted a drop-down menu; content is all but verbose) and it certainly isn't as streamlined as I'd like, but my client is happy with it, and that's what's important to me.
If you have clients looking for hosting, I use dreamhost.com and have been happy with them.
They are like $10 a month for hosting.
Good luck!
things like that are so that the secretary can be conned into maintaining the company website in their spare time. not for any sort of even semi professional use.
for hosts, i personally use asmallorange.com. they are more than enough for my needs.
I meant more in terms of coding structure and such. Have you checked it in a variety of browsers etc? :P