What could cause the same browser on different PCs to render the same HTML differently?

放肆的年华 提交于 2019-12-03 07:24:28

Since we can't take a look at the site in our own browsers, here is the process that I would use to try to nail down the issue:

  • Start removing code blocks piece by piece until the two browsers look the same.

  • Whichever block of code you last removed that made everything line up perfectly (even if you are missing a chunk from the body), that's near where the culprit is.

  • Since you've found the culprit, place all of the code back. Start messing around with the fonts first off. Change fonts, sizes, remove text, etc. until you can find a condition under which the browsers are the same. If it's not a font issue, start messing around with other parts of it until you've found the condition that matches it up.

  • Once you've done that, you will know your issue and you can work around it.

IF you're using Firefox make sure you hit Ctrl-0 to default the zoom level.

I know my FF3.0 makes everything look different than other people's because I have it set in Preferences to use a minimum font size of 16. I dont get fine print, I get a pile of legible writing.

Also, being on a Mac, the default fonts are sans serif, whereas on windows everything is serif, which also can change the font widths and heights even further.

If anything on your page is specified with "em" or "ex" units, they are dependent on font size.

I'd compare plugins/addons.

How about your font smoothing settings - are they the same (none/antialias/ClearType)? That can change the width of a given text, and might just be what you're looking for.

Are you both using the exact same screen size? Does firefox try to scale the fonts to the apparent size of the person viewing the page, or to a specific number of pixels?

One thing that comes to mind is installed fonts. If you have a font that the client doesn't there could be a 1 pixel difference in a computed size. FF and IE could be rounding differently, which would explain why they behave differently.

I mostly agree with all the "font guys" further up, but if that doesn't help try checking the HTTP headers since some headers might be added by proxies and such between the server and your client. But try the font suggestions first...

Good luck ;)

DIfferent operating systems have different font rendering engines. Vastly different. More than enough to cause at least a 1 pixel difference, depending on how you set up your CSS.

My first guess is something to do with the window, I don't recall this ever happening in firefox but try resizing the window anyway. It is also possible that there actually is something 1px wide taking up that space, such as a hidden frame or whatnot. These might be completely off the mark since I don't know how you actually made the thing.

A possible workaround is displaying one of the images as a background to a div instead of using an img tag, this'll cause it to simply be truncated instead of wrapping if it's 1px off.

Debby P.

I saw this problem once, and as it turned out the user had zoomed the page, and the zoom caused math rounding issues. I had inadvertently zoomed my page to 120%, they had just your normal 100%.

With current update in browser, the browser zoom settings take the dpi settings of the system.

In windows 7, setting dpi = 125% will produce the zoom effect at 100% zoom of the browser window.

So, this is not related with HTML. i.e. to say settings of width = 300px will produce different size box on same browser with same zoom settings but with different dpi settings.

Dpi = 125 % will produce larger box.

So, if you want to reduce the zoom level, either zoom out the browser by pressing ctrl + -, or reduce the dpi settings of the system by following steps

  1. For windows 10 http://www.windows10update.com/2015/05/windows-10-tutorials-79-change-dpi-scaling-level-for-displays/
  2. For windows 7 http://www.lawfirmsoftware.com/support/change_dpi_settings_windows_7.htm
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!