CSS 下拉问题

发布于 2024-09-29 01:34:54 字数 328 浏览 3 评论 0原文

我是一名 .NET/Java 人员,必须做一些网站工作。 CSS 等完全是初学者。我一直在使用模板,并且必须将菜单转换为下拉菜单,并且遇到了很多困难。

我已经上传了当前的迭代,可以在这里找到它的准系统菜单和 css 页面:

http://www.nitricburnstudios.com/tmp/cssproblems/features.html

菜单项彼此重叠。

感谢您的帮助!超级感谢。

I am a .NET / Java guy and have to do some website stuff. Complete beginner with CSS etc. I've been working with a template and had to convert the menu to a drop down and have been having loads of difficulty.

I've uploaded the current iteration and it can be found here with the barebones menu and css pages:

http://www.nitricburnstudios.com/tmp/cssproblems/features.html

The menu items are overlapping with one another.

Thanks for any help! SUPER appreciated.

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

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

发布评论

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

评论(3

白馒头 2024-10-06 01:34:54

我不确定这是否适合您的项目,但是有很多罐装 解决方案这个 这应该可以防止你重新发明轮子。

I'm not sure if this is possible for your project, but there are lots of canned solutions to this that should prevent you from reinventing the wheel.

傲性难收 2024-10-06 01:34:54

嗯,这取决于 1)您是否只是想让某件事发挥作用,或者 2)您坚持自己做并理解它。

如果 1) 我发誓使用 http://wonderwebware.com/css-menu/ CSS 菜单生成器(您不需要使用它,只需研究它的输出)

如果 2)您需要做的第一件事是了解 W3C 的验证服务。我通过 CSS 验证器 运行了你的 dropdown.css ,它有 1 个错误,这可能是导致你的问题“属性行为不存在:url(csshover.htc)url(csshover.htc)”

Styles.css有11个警告“两个上下文中颜色和背景颜色相同”,这可能解释了为什么我在菜单上看不到任何文本:-)

好消息是 HTML 验证器表明您的 HTML 没问题。

如果你想学习 CSS,我可以推荐一些很棒的网站

Well, it depends on 1) if you just want to get something working, or 2) you insist oin doing it yourself and understanding it.

if 1) I swear by http://wonderwebware.com/css-menu/ a CSS menu generator (you don't need to use it, just study it's output)

if 2) the fist thing you need to do is to lean about the W3C's validation services. I ran your dropdown.css through the CSS validator and it had 1 error, which might be causing your problem "Property behavior doesn't exist : url(csshover.htc) url(csshover.htc)"

Styles.css had 11 warnings "Same colors for color and background-color in two contexts", which might explain why I couldn't see any text on the menus :-)

The good news is that the HTML validator says that your HTML is ok.

If you want to study CSS, I can recommend some great sites

浅语花开 2024-10-06 01:34:54

这是一个非常简单的垂直示例,可以帮助您入门:

HTML

  <div id='dropper'>
    <div>Foo</div>
    <div>Bar</div>
    <div>Bas</div>
    <div>Snork</div>
  </div>

CSS

#dropper { overflow: hidden; height:25px; line-height:25px }
#dropper:hover { height:100px }

Here's a very simple vertical example that may get you started:

HTML

  <div id='dropper'>
    <div>Foo</div>
    <div>Bar</div>
    <div>Bas</div>
    <div>Snork</div>
  </div>

CSS

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