Disadvantages when I set the zoom=1 attribute for all regarded tags of a document per default?

StackOverflow https://stackoverflow.com/questions/15900301

I develope for IE8 for a client. It happens regularly that css settings are not working (e.g. word-wrap) and when I investigate a common reason is that the hasLayout = true (resp. zoom=1) attribute is not set for the tag. I thought if I just set in my default stylesheet zoom=1 in advance that I don't run in this issue anymore? Does anything speak against it? Are there certain other potential problems when all tags regarded have the zoom=1 attribute set per default? I would be grateful for help.

有帮助吗?

解决方案

I wouldn't set zoom:1 as a default. If you need hasLayout triggering then fine add

*
{
  zoom:1
}

as part of your debugging but when you have decided that you need hasLayout = true spend some time narrowing down the selector so it targets just the element(s) you need it to target.

I have seen previously working layouts broken by a blanket setting zoom:1. IMHO It is better to understand the specific scenario that needs fixing as this may help in the future.

All the default setting of zoom:1 teaches you is that IE7\8 is a buggy peice of crap and you knew that anyway :-)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top