Forum Moderators: not2easy

Message Too Old, No Replies

new server changes css look

moving from one server to another makes the site go wonky

         

sldesigns

8:01 pm on Apr 19, 2008 (gmt 0)

10+ Year Member



I've been developing a site on my server, but when I moved the files over to the clients server the layout got screwy.

I don't understand why a server makes a difference but we were looking at pages on both servers in the same browser and the fonts and layout were larger on the new server.

My server is linux and theirs is windows if that makes any difference. The layout uses ems, so this might be a font issue?

Before I go trial and error on the layout I'd appreciate any direction -- it may be a simple fix.

swa66

11:47 pm on Apr 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It should not.

I'll assume your code validates (and that you didn't change the normal slashes "/" into backslaches "\" in the paths of the files inside your css)

That said, take care that the path to all files is properly set so that all files are actually found by the web server. Check the error log of the web server, it should be in there if it gets asked for files it doesn't find, can;t read or whatever the problem might be with it.

Other things might by mime types used by the other web server.

Check the code (view source) of what you get from the server (just to make sure you didn't loose e.g. server side includes or some scripting language that kicked in).

penders

11:12 am on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Other things might by mime types used by the other web server.

This is about the only thing that I've encountered that could genuinely effect the layout when moving servers. eg. the server could return a mime-type of "text/plain" for CSS files (instead of "text/css"), resulting in FF not picking up the stylesheet at all! (AddType in .htaccess file would sort this - but are .htaccess files supported on the Windows server?!).

g1smd

5:03 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The .htaccess is for Apache only.

IIS has some other scheme.

encyclo

5:26 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The server will make no direct difference to how the markup is handled - the HTML/CSS is parsed by the browser, not the server. When there are questions of this type, the usual outcome is that either the wrong files were uploaded (eg. older versions of a CSS file), or that the HTML has been modified in some way.

Which browser(s) are showing the problem? As mentioned by swa66, you need to check the source code to see if anything has been added to the HTML file, in particular before the doctype - an increase in font size is indicitative of a change from standards-compliance mode to quirks mode, which can happen when the doctype is not the very first element on the page.

sldesigns

7:36 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



I checked the css -- valid 2.1. I changed encoding to utf8 and modifed the layout so the em sizing has less cascading. This helped. I will check with the clients IT people to see if there are any errors on the server.

It was really strange because only the ftp upload location changed. The css was still there, but the text sizing was different. We were working on the client's computers, same browser (ie-ugh), going back and forth between the old url and the new one.

This is the doctype (same on both versions)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
The css was exactly the same at that time (made my layout changes last night)

Maybe they have something in their whatever-replaces-htaccess file to make type sizes larger? Seems weird.

penders

8:06 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Maybe they have something in their whatever-replaces-htaccess file to make type sizes larger? Seems weird.

To make the text size larger, either something about the page itself has to change, or a setting in the browser itself must be different?

Are you using any server-side scripting? If, for instance, there was an error server-side (PHP may be) and an error message was output to the page before the doctype then this would result in IE rendering in quirksmode and font sizes could well be different (as encyclo suggests). An error in this instance may not always be obvious, as the text colour could be the same as your background? View-Source and what can you see?

sldesigns

8:29 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



Alas, no php includes. Their server doesn't support php and I never did get an asp test to work. The closest thing is library elements from DW.

Now don't yell because I only use DW for a shortcut view of what I'm coding -- it doesn't do any of the hard work. The site is strictly xhtml/css. No javascript yet (google analytics to be added later) But I do not know how the library items are grabbed. The source code shows the library call in a comment and the items as part of the content. There is no other code in the header or elsewhere calling the library items.

penders

9:57 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, in the same browser (which browser? IE6?) on the same machine, the site served from the Linux server is OK, but exactly the same site served from the Windows server is not? The fonts (and layout?) appear larger, but the stylesheet is mostly rendered OK?

I think you're going to have to view source in the browser of both sites (HTML and CSS) as they appear in the browser and compare. IMHO there must be a difference?!

jdMorgan

10:08 pm on Apr 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check the MIME-type returned with the CSS files when requested, as suggested twice above.

The "Live HTTP Headers" add-on for Firefox/Mozilla browsers is very handy for doing this.

Jim

sldesigns

11:16 pm on Apr 20, 2008 (gmt 0)

10+ Year Member



Penders, your summary is exactly right. Windows ie, not sure which version.

Thanks jdMorgan, I skipped over the MIME-type tip. I've been using my mac at home to compare, but will do so on the clients windows machines instead (DUH moment!).

Will post results in case the problem comes up again.