LiveEn
LiveEn

Reputation: 3253

website displayed differently on localhost and when uploaded to a server

I have designed a responsive website using php. its mainly html but i have included some php functions and saved all the pages. I have 2 style sheets 1 for the responsive and the other for the normal view. I tested the complete site in my localhost (wamp server) and didn't see any issues but when i uploaded the website online, the complete design seems messed up. All files including the css are uploaded correctly.

the fonts are too small, the alignments are not correct and the site seems to be shirked, but the same site shows everything correctly when tested in my local host.

Can someone please tell me what is the problem?

Upvotes: 1

Views: 5705

Answers (2)

bennett_an
bennett_an

Reputation: 1708

You may be using fonts that are not "web safe". Make sure you are using font families as shown here. Font families allow each browser to pick a font it's familiar with, but close enough to the original to not affect layout much. There a very few fonts that ALL browsers can render by default. But you can upload your font files to be downloaded by the browser on load if it is very important to use that font. Takes a long time to load the page though. More info on that here. I also like using fontsquirrel.

Upvotes: 1

MarcinWolny
MarcinWolny

Reputation: 1645

  1. Ensure all files (especially CSS and JS) are loaded. You can check this for example by using Firebug Net panel. Be extra-careful looking for any spelling mistakes that pass unnoticed on windows but are lethal on Linux (eg. on Windows test.JPG and test.jpg are the same, on linux these are two different paths!)
  2. Press CTRL+0 (zero) to reset zoom level for your domain.
  3. Ensure you don't load any additional files and libraries to your website that you don't load (or couldn't load) on localhost.

Upvotes: 2

Related Questions