仅在 Safari 中的 div 之外的文本 [英] Text outside div in Safari only

查看:47
本文介绍了仅在 Safari 中的 div 之外的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个错误,它让一些文本出现在右侧 div 外几个像素的地方.奇怪的是,它只发生在 Safari 中.我以前从未见过它,它只是我使用过的常规 HTML/CSS.我在互联网上环顾四周,但我找不到完全相同的问题 - 由于固定高度,只有一些内容漂浮在底部的问题.

I have this bug that let some text appear a few pixels outside a div on the right side. The strange thing is that it only happens in Safari. I've never seen it before and it's just regular HTML/CSS what I have used. I've looked around on the internet but I can't find the exact same problem - only some problems with content floating out at the bottom, because of a fixed height.

在接下来的 2 个屏幕截图中,您将在 Safari 和 Chrome 中看到相同的页面.div 有一个 overlow:hidden 来隐藏可能的第三行文本.我在尝试解决问题时添加了固定宽度.我也尝试添加/删除一些边距,但无法去除多余的像素.

In the next 2 screenshots you'll see the same page in Safari and Chrome. The div has a overlow:hidden to hide a possible third line of text. I added fixed widths when trying to solve the problem. I also tried to add/remove some margins, but I can't get rid of the extra pixels.

这里是该页面的完整链接.它仅发生在网站的这一部分.在其他部分 - 比如 this one - 我使用相同的格式,几乎没有区别,但是同样的 CSS 思路(固定宽度和溢出:隐藏),Safari 中没有错误.

Here is a full link to this page. It happens in this section of the website only. In other sections - like this one - where I use the same format with little differences, but the same CSS idea (fixed width with overflow:hidden), there is no bug in Safari.

我希望你有一些想法!

推荐答案

Removing position:absolute from

Removing position:absolute from

div#branch-search-results-block div.search-result-right div.search-result-drvl-info-bottom .spacer::after

css 样式解决了这个问题.但我不确定还有什么受到它的影响.请试试这个.

css style solves the issue. But I am not sure what else is affected by it. Please try this.

这篇关于仅在 Safari 中的 div 之外的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆