Safari 中的边距问题 - 在 FF (wordpress) 中工作正常
我在这里发现了一个相当有趣的事故。 我的导航有负边距,因为我希望它专门放置。在 FF 中一切看起来都很好,但在 Safari 中我的内容会跳到我的导航所在的位置,就好像我的导航不存在一样。
我尝试玩弄数字,当我将其从 -77px 更改为 -55 时,内容会跳转到它应该在的位置(但显然我的导航没有)。
这里是通过pastebin指向我的代码的链接。
非常感谢任何帮助! 噢,网站在这里 谢谢
I've found a rather interesting mishap here.
I have a negative margin on my navigation as I wanted it to sit specifically. All appears fine in FF, but in Safari my content is jumping up to where my nav is, as if my nav does not exist.
I tried playing around with the numbers, when I change it from -77px to -55 the content jumps where it's supposed to be (but obviously my nav does not).
Here's a link to my code via pastebin.
Any help is much appreciated!
Oh, the site is here
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为,网站的布局设计存在一些问题,导致了这个问题。 Chrome 中也存在问题。
首先,您的导航不包含在其自己的
div
中,这并不真正符合您所遵循的设计模式。考虑进行以下重新设计:这将使您能够更好地控制布局,并且您将在
nav
div 而不是ul
上进行更改。您的clearing
div 并不是完全必要的,因为您没有float
任何元素,但我认为您正在使用它们来创建空白 - 要么使用边距,要么分配导航元素的高度和您原来的问题应该得到解决。我希望这有帮助。You've got a few problems with the layout design of the site that are causing the problem, I think. It is having issues in Chrome as well.
First, your nav isn't contained in its own
div
, which doesn't really fit in with the design pattern you're following. Consider a redesign with the following:This will give you much more control over the layout, and you'll make changes on the
nav
div instead of theul
. Yourclearing
divs aren't completely necessary as you're notfloat
ing any elements, but I think you're using them to create white space - either use margins or assign the nav element a height and your original issue should be resolved. I hope this helps.