Div 在 IE7 和 IE7 中不合适8
我在这个项目中遇到了 3 个 div 的问题,菜单、横幅和页脚在 IE 中不合适,但在 firefox、safari 和 google chrome 中它们出现在正确的位置。
我是 joomla 的新手,我从头开始制作了模板,我需要帮助来解决这个问题,我尝试搜索论坛并检查类似的问题,但我找不到解决方案。
链接:
http://staging.socinterangola.com
提前致谢。
I have a problem with 3 divs in this project, menu, banner and footer are out of place in IE but in firefox, safari and google chrome they appear in a right place.
I m new in joomla and i made the template from the scratch, i need help to figured out this issues, i try search the forum and check similar problems but i d'ont find a solution.
The link:
http://staging.socinterangola.com
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我目前使用的机器没有 IE,所以我不得不猜测一下 - 抱歉。
Banner div 向左浮动并且有左边距。这是 IE 的一个经典问题 - 如果您朝某个方向浮动并且该侧有边距,则边距会加倍。解决方案:在浮动项上设置相同值的边距。或者,通过在左侧放置内边距而不是在左侧外侧放置边距来使横幅 div 更宽。
MenuNav 有同样的问题 - 左边距和向左浮动。同样,在 IE(我认为是 6,7 和 8)中,当它们位于浮动的同一侧时,边距会加倍。
在页脚上,我看到的唯一可疑的是顶部的负边距。某些浏览器会忽略这一点,而其他浏览器则不会 - 因此这可能是导致您的问题的原因。
希望这会有所帮助 - 但正如我所说,确实涉及一些猜测。
The machine I'm currently on doesn't have IE so I'll have to guess a little - sorry.
The Banner div is floated left and has a left margin. This is a classic issue with IE - if you float in a direction and have a margin on that side the margin gets doubled. Solution: put a margin right of the same value on the item you are floating against. Alternatively make the banner div wider by putting padding inside on the left instead of a margin on outside the left.
MenuNav has the same issue - left margin and floated left. Again, in IE (6,7 and 8 I think) margins get doubled when they are on the same side you float to.
On the footer the only thing I see that is suspicious is a negative margin on the top. This is ignored by some browsers and not others - so is a probable cause of your issue.
Hope that helps - but does involve a little guesswork as I say.