Why is text rendered with a greater font-size in Opera?

血红的双手。 提交于 2019-12-01 16:09:21

My suspicion is that Opera uses a different fallback font for Sans-serif than the other browsers do. That should be possible to confirm or eliminate by using a different font that is definitely installed on the system.

I came across this thread when I was having similar issues with Opera 11.10 on Windows 7 x64.

Opera was defaulting to using 20px as the body font-size (rather than 16px which is what other browsers use). This persisted even after uninstalling, deleting Opera preferences and re-installing. It turns out that Opera will honor your system font-size preferences (set under 'Control Panel\Appearance and Personalization\Display' on Win7) for rendered website text whereas other browsers (I tested FF4, Chrome 11, Safari 5, IE 9) do not. My system font size was set to 125% which explains the 20px. Once I set my system font zoom to 100%, Opera behaved the same as the others.

I'm not sure which behavior is more correct (In a way, it's nice that Opera honors my font choice) but since since other browsers do not do the same, it is "unexpected". I don't have a Mac to test but perhaps MacOS has a similar system font preference?

I was having a similar issue.

I found that the default computed font size in FF and most other browsers on is 16px, but on opera the default seems to be 20px.

I simply set font-size:16px; for html, and it seemed to take care of it.

I'm not reproducing your problem. This is what I get in Firefox 3.6.8 (and in Internet Explorer 8):

I think I know your problem. I am getting it exactly the same size in all browsers (at least Firefox, Opera and Chrome). This, I am sure, can be easily overlooked if you dont know you or someone else has done this, but try checking the zoom settings in Opera... let me know if it doesnt help and I will work some more on it.

This is where a css reset stylesheet can really simplify things for you.

http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

I had similar issue until I used reset CSS of Eric Meyer :)

Came across similar issues, had to change my fallback order from:

font-family: Helvetica, Verdana, Arial, sans-serif;

to

font-family: Helvetica, Arial, sans-serif;

Since Arial and Helvetica are almost exactly the same size, when opera falls back it still looks good.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!