CSS 菜单问题

发布于 2024-09-16 02:20:56 字数 611 浏览 1 评论 0原文

我有这个 CSS 菜单。它功能齐全。

alt text

但是当我将其放入页面中的某个表格单元格内时,它会像这样爆炸。不要介意银色和蓝色的线,它们来自页面。

alt text

现在我已经调试了页面和菜单本身。没有错误仍然是这种奇怪的行为。然后我得到了另一个菜单并将其放在这里,它显示了相同的错误。知道为什么会发生这种情况吗?

我可以粘贴代码,但我认为没有人会去阅读 500 行 HTML 和 100 行 CSS。

我正在使用最新的火狐浏览器。 IE6 也显示出相同的行为。

检查此处的代码...

页面中独立的 CSS 菜单

复杂页面内的 CSS 菜单

I have this CSS Menu. It's fully functional.

alt text

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.

alt text

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...

CSS Menu Independent in a page

CSS Menu Inside a complex page

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡淡的优雅 2024-09-23 02:20:56

您的“就地”样式表比“最小”样式表长得多,并且包含更改布局的规则。特别是,搜索“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.

平安喜乐 2024-09-23 02:20:56

在某些浏览器中,表格的一些默认样式不是您所期望的。我现在不记得了,但我认为其中之一默认是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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文