简体   繁体   English

Safari中的CSS定位中断

[英]CSS positioning breaks in Safari

i have a website in which i am trying to position (using CSS) a certain on the page. 我有一个网站,我试图在其中定位(使用CSS)页面上的某个位置。 the is absolutely positioned and is located inside a relatively positioned paernt . 它是绝对定位的并且位于相对定位的内部。 on firefox and even IE it looks ok but on Safari, things get messy and it shows 5 pixels lower than it should. 在Firefox和IE上看起来还可以,但是在Safari上,情况变得混乱了,它比实际显示的要低5像素。 i have tried to figure out for days now what is wrong there but cannot seem to see it. 我已经尝试了好几天了,现在哪里出了问题,但似乎看不到它。

you can find an example link to the problematic page here: http://yaronattar.com/index.php?option=com_content&view=article&id=117:the-new-lovers-2010&catid=51:the-new-lovers-2010&Itemid=242 您可以在此处找到问题页面的示例链接:http: //yaronattar.com/index.php?option=com_content&view=article&id=117 :the- new-lovers-2010&catid=51 :the- new-lovers-2010&Itemid= 242

the problematic is the one conaining the "previous/next" navigation at the bottom right corner of the page. 有问题的是那是在页面右下角的“上一个/下一个”导航。

anyone sees what is causing the trouble here? 有人看到造成问题的原因吗?

thanks 谢谢

This will target webkit browsers only (Chrome, Safari and I think a version of Opera too) 这将仅针对Webkit浏览器(Chrome,Safari和我认为也是Opera版本)

@media screen and (-webkit-min-device-pixel-ratio:0) {
    /Chrome and Safari CSS here/

    #id-name {
        position:absolute;
        width:100px;
        height:100px;
        left:100px;
        bottom:100px;
    }
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM