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

HTML

Scott Moore
Scott Moore
4,050 Points

Need some help!

Pulling my hair out here! I have been writing code and testing on the local. I test the code in Chrome, Firefox and IE11.Also the code is validated by w3c.

I get how I want the site to look, but when I upload it the site looks completely different. The code hasn't changed. The directories are fine.

So why would a website change? One of the things it appears is I am getting a margin collapsing issue and items just out of place. Doesn't happen when testing on the local.

So why would a website change so much when it goes live? Is the local doing something different? Is the webhost doing something different? I have the cache set to off so I could see any changes I make right away.

Thoughts?

Thanks

8 Answers

Scott Moore
Scott Moore
4,050 Points

Hey all thanks for the help. Joys of learning but I figured out the problem. 1. I didn't have this set up in my head.<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">

  1. I needed to change the wording of img to images to point in the right directory. Weird cause the images were showing up!! Thanks
Nick Nish
Nick Nish
7,304 Points

Ahh. I'm glad you figured it out man, sorry we couldn't suggest a meta tag earlier. Wish I would have known you were looking at it from a smaller viewport earlier so we could've helped you out!

Are you using Dreamweaver?

Scott Moore
Scott Moore
4,050 Points

No, brackets and sublime.

Nick Nish
Nick Nish
7,304 Points

Hey Scott Moore, I wish I knew more about how FTP works and more about how things work on the server, but this sounds awfully weird, especially if you've tested in other browsers already. My first thought was browser default differences (which can be alleviated via normalize/reset.css).

Curiously waiting for someone more informed to answer, as well.

Scott Moore
Scott Moore
4,050 Points

Nick, I have a reset in place as well. It just doesn't make sense.

Nick Nish
Nick Nish
7,304 Points

If you make a codepen or jsfiddle of the page that's breaking, I can take a look at it in the meantime.

You might check your file permissions. If you can push the project to Github, that'd help as well.

James Barnett
James Barnett
39,199 Points

Throwing it up on cloud9 might be simpler depending on your current familiarity with github.

James Barnett
James Barnett
39,199 Points

Scott Moore - Do you have a link we can look at?

My first guess would be an issue with a CSS file, either relative path issue or a permissions.

Scott Moore
Scott Moore
4,050 Points

Hmm file permissions. I just checked them. They are set to Read: user, group, other. Write:User. Execute: none checked. If that makes a difference. I will put together a github in a little while. Thanks for replying so far. Gotta go fire up the grill. Be back soon.