Chrome/Safari RTL
我被要求修复 RTL 站点中的菜单。顶部菜单的元素在 CSS 中具有 RTL、text-align: right 和 float right,但子菜单在 Chrome 和 Safari 中保持向左对齐。我尝试过负左边距,但它让一切看起来更糟。
链接:http://daatsolutions.info/TA 用户: 来宾 通过:l0gin...
还有什么我可以尝试的吗?
I've been asked to fix a menu in a RTL site. The elements of the top menu have RTL, text-align: right, and float right in the CSS, but the sub menu keeps aligning to the left in Chrome and Safari. I've tried negative left margins but it makes everything look even worse.
Link: http://daatsolutions.info/TA
User: guest
Pass: l0gin...
Is there anything else I can try?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它在 chrome(pc,最新版本)上看起来很好。但在 Safari 中,菜单似乎是左对齐的。不过子项目还是不错的。
问题是你在CSS中将position:absolute分配给#access .menu-header .sub-menu,这会导致safari忽略float属性,为每个添加一个style =“position:relative”
应该可以解决你的麻烦。
顺便说一句,您的页面在 html 标记中有很多错误:我强烈建议您修复它。
http://validator.w3.org/ 应该为此提供必要的帮助。
我还建议您尝试 firebug(现在也可用于 ff 以外的浏览器),它是一个救星!
It appears fine on chrome(pc, latest ver). But in safari the menu seems to be aligned left. But the sub items are fine.
The problem is that you have asssigned position:absolute to #access .menu-header .sub-menu in your css, this results in ignoring of the float property by safari, adding a style="position:relative" for each
<ul class="sub-menu">
should solve your trouble.
BTW, your page has many errors in html markup : I strongly suggest you fix it.
http://validator.w3.org/ should provide necessary help for that.
I also suggest that you try firebug (now also available for browsers other than ff) it's a lifesaver!