为什么即使使用相同的CSS也会有不同的结果?
I copied a PHP web system which made 10 years ago on Linux to my windows PC.
I installed PHP 5.6.2 on my windows PC And It is higher than installed Linux. (old system's PHP is 5.1.4)
But when i compared two web site, they were different a little.
This is the old php in Linux system.
Do you know difference? The old system's text of menu aligned to center.
But new system's aligned right a little from center.
So i checked css, But these css are same.
somebody know about this?
Assuming you have the same HTML DOM, CSS and running the two system on the same browser, browser version and browser compatibility mode..
Have you checked if they are having the same values for the following?
- HTML doctype
- X-UA-Compatibility meta type
What the browser renders is the HTML/CSS/Javascript generated by the PHP web server, so the first thing you should check is if the code that's behind those two pages is exactly the same.
If that's the case, you can increase the consistency across different browsers by adding a reset css before the first stylesheet you use. This will reduce the differences in the default browsers's behaviour regarding the style.
I have often used Meyer's reset css, but I know there are newer versions of it and probably some different ones.
I perceived that i had understood one. I'm testing same version IE browser. So i though two site shown up same as same ver.
But old site's document mode was IE5, and new site's edge.
And it was the reason of difference.
Thank you for many comment.