Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Layout Basics Getting Started with CSS Layout Getting Started with CSS Layout Review

Miguel Nunez
Miguel Nunez
3,266 Points

This is Random two CSS links begin to fail over time aka normal css link and media query link in a html document. WHY?

I don't need help on a code challenge I know this is a random but does any one here have a host gator account? OK here's my situation I been making my html web pages in other words I been linking two css links in each html doc. One is for media queries for smart phones which is under a different name and the other is just plain css for desktop so those two links are added to each html docs in my host gator folder so I use the same method with more html pages with in the same folder so the more I do this the more it glitches it seems and it doesn't show no media queries css sheets over time the more I use this method the more that it gets worse like glitches or something like that and I know it's not my computer I tried this on different computers with my account. Like I said I made multiple html sheets which each one has two css links one is for desktop and one is for media queries for smart phones all the desktop css sheets works great but why do the media query css sheets begin to failed the more I do this in the same folder in my host gator folder I tried this off line in xampp and it works like a charm can any one explain this and here's a screen shot of the media queries css sheets i made for smart phones. They are name with the file name plus a capital M at the end and the desktop css version is named with the file name plus with a capital D the more I do this the more I have to play with it to make it work it usually involves deleting or repasting the media queries lines of codes back to that empty media queries sheets but over time it seems like that method begins to fail more and more which I have to constantly do it to get it to work but now its not working. Here's the links to understand my situation more and ps the codes are correct because when I shrink the desktop web browser window it begins to show the media queries don't work on smart phones screen.

https://drive.google.com/file/d/0B4WgvLBMKuosMGw2aHJSNGl1NEU/view

https://drive.google.com/file/d/0B4WgvLBMKuosNW5FdGRxTDlNYUU/view

3 Answers

Dave Huish
Dave Huish
17,727 Points

It could be that your old style sheets are being cached and that you need to hard reset the browsers.

Max Weir
Max Weir
14,963 Points

Its a rather strange way to manage your style sheets, but understand this is still just testing for a solution. Ideally you should compile this into one stylesheet so it's a single request to the server.

So what media queries have you got get in both style sheets? are you using max-width and min-widths etc. Can't go off much here without knowing a bit more.

Miguel Nunez
Miguel Nunez
3,266 Points

Never mind guys a guy suggested the fix is this

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width">

Dave Huish
Dave Huish
17,727 Points

Glad that you got it working.