IE CSS alignment issues

前端 未结 5 1864
说谎
说谎 2021-01-20 21:11

I have the following CSS that i have \"hacked\" with PHP because it doesn\'t align properly in IE7. Is there a better way to do this without resorting to PHP?



        
5条回答
  •  有刺的猬
    2021-01-20 21:49

    Typically when I see dev's doing this sort of thing, it is because they don't understand what is going on. Then they end up with 3 separate copies of essentially the same, HUGE CSS file; and a lot of headaches.

    IE conditional comments in a safe step in the right direction; especialyl that browser sniffing in your php example is doomed to fail as the user agent string is not guaranteed.

    My best recommandation to you is to take the time once to read through the very boring W3C CSS documentation, if only the chapter about DISPLAY BLOCK and INLINE modes. Once you read that, 90% of your css layout problems will be solved. The rest is getting used to the most common IE6 bug, which is the infmaous "layout" mode.

提交回复
热议问题