1

So I am building a website for a client. I have the site in my htdocs folder within xampp as well as in a folder on my desktop.

I developed the home page a few days ago and everything has been working fine on it. I have a css file in a css folder, and I have images in an images folder. My file paths are correct, I know for a fact because I have spent the last 30 minutes checking them. My tag is set up correctly, and my images names are correct.

I have validated my html and css and both are 100% correct. I know with out a doubt that everything is as it should be. All I did was add a media query to the bottom of my css document, refresh the page to check it, and all of the styles and images are gone.

I have removed the media query, I have check back up of the file that should work like it did yesterday, and I have crawled up and down my code. For some reason neither the desktop or the xampp version of the page are working. I have exhausted all resources in understanding why this is happening. I thought it might be my computer but every pages I have been to is working fine so it has to be something in my files, only I have checked everything I can think of.

Has anyone had this problem, and can anyone think of something that I might have missed?

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
  • this may help: http://stackoverflow.com/questions/7859336/css3-media-queries-not-working.. read all the answers...may be you are missing something in your media queries...Also, to get answers, you should edit question and also post your CSS(with media queries.) – Krupal Shah Aug 16 '14 at 09:05
  • Thanks Krupal but the issue isn't with the media query. Whatever happened knocked out my dom's ability to follow file paths meaning that the issue is with the html not the css. I managed to figure out that it was the meta tags. Now I am trying to single out the meta tag that is causing the issue. – user3700610 Aug 16 '14 at 09:12
  • This was with me too..I really hoped to get some answers here.(that why i upvoted)..one suggestion: edit your question and put CSS too. – Krupal Shah Aug 16 '14 at 09:14
  • Krupal my css wasn't the issue. You are having the same issue? is it with the images and js as well or just with your css? I edited my question with my answer. Let me know if it helps. – user3700610 Aug 16 '14 at 09:24
  • Is the `
    ` tag in your question an attempt to add code styling, or is that the actual markup you've used? Also, have you read this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base ?
    – Tieson T. Aug 16 '14 at 09:27
  • no I put that there for the post. I realized after that ctr+k would have sufficed by itself. – user3700610 Aug 16 '14 at 09:29
  • Tieson That link explains everything and confirms my thoughts. I've never used the base tag before. It makes sense now though. Thanks. – user3700610 Aug 16 '14 at 09:32
  • 1
    @user3700610 If you think you understand the issue, consider self-answering your question. – Tieson T. Aug 16 '14 at 09:42
  • @user3700610 your issue is different..I had a working css and when I added media queries to my css, it didn't load properly...I can't ask here because I'm in the danger of getting banned here. – Krupal Shah Aug 16 '14 at 09:52
  • Krupal all I know to tell you is to google media query syntax. It is really quite simple once you understand the syntax and what things like "only" mean. – user3700610 Aug 16 '14 at 10:41

1 Answers1

2

After deleting my meta tags (out of desperation, I don't know how I would have reached this conclusion) the file started working again.

I had copied the meta tags from another site I built to save myself some time. I went through each one to see who was causing the issue, and it turns out that this:

<base href="http://designsbygabe.com/" />

is the issue. I'm not sure how relevant this tag is. CMS made simple auto generated it on the site I copied it from.

I can only assume that because I am running off of xampp but telling my document that The above href is the base that it confused the browser. I don't really know though.

the weird thing is that I added these yesterday and the site work up until a few hours ago.

I guess the lesson here is that when in doubt you should check your meta tags.

Davidmh
  • 3,797
  • 18
  • 35
  • 2
    Should probably move everything after `****` into your answer, minus the "thanks everybody". If you can do that, I will clean it up at some point. – Tieson T. Aug 16 '14 at 10:02
  • 1
    I have done it for you. You found the answer to your question, post it as such, so the future users can see it was answered, and what the solution was. – Davidmh Aug 16 '14 at 10:13
  • 1
    That tag forces all scripts, stylesheets, images, and links in the site to be loaded from `http://designsbygabe.com/`. If the site is not `http://designsbygabe.com/`, it would break all those links. – tcooc Aug 16 '14 at 10:22
  • 1
    you should rather post it as an answer here – user63762453 Aug 16 '14 at 10:23