CSS 菜单问题
我有这个 CSS 菜单。它功能齐全。
但是当我将其放入页面中的某个表格单元格内时,它会像这样爆炸。不要介意银色和蓝色的线,它们来自页面。
现在我已经调试了页面和菜单本身。没有错误仍然是这种奇怪的行为。然后我得到了另一个菜单并将其放在这里,它显示了相同的错误。知道为什么会发生这种情况吗?
我可以粘贴代码,但我认为没有人会去阅读 500 行 HTML 和 100 行 CSS。
我正在使用最新的火狐浏览器。 IE6 也显示出相同的行为。
检查此处的代码...
I have this CSS Menu. It's fully functional.
But when I put it in my page inside some table cell, it blows up like this. Don't mind the silver and the blue lines, they are from the page.
Now I have debugged the page and the menu itself. No error still this weird behavior. Then I got another menu and put that in here and it showed the same error. Any idea why is this happening?
I could paste the code but I don't think anybody is going to go through 500 lines of HTML and 100 lines of CSS.
I am using the latest Firefox. IE6 shows the same behavior.
check the code here...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的“就地”样式表比“最小”样式表长得多,并且包含更改布局的规则。特别是,搜索“280”——您要为其设置一些宽度。
Your "in-place" stylesheet is much longer than your "minimum" one, and contains rules that are changing the layout. In particular, do a search for "280" -- you're setting some widths to that.
在某些浏览器中,表格的一些默认样式不是您所期望的。我现在不记得了,但我认为其中之一默认是align=“center”。
也许尝试将表属性显式设置为您希望的值?
W3Schools 用于表属性。
In some browsers, tables get some default styles that are not what you expect. I can't recall right now, but I think one of them was align="centre" by default.
Maybe try setting the table attributes to what you want them to be explicitly?
W3Schools for table attributes.