菜单作为无序列表水平还是表? [英] menu as unordered list horizontally or table?

查看:146
本文介绍了菜单作为无序列表水平还是表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个无序的列表,我作为页面的顶部菜单水平显示。我已经得到了显示相对较好,虽然我一直在玩的间距为IE6和IE7因为它不能正常显示。震惊。在任何一种情况下,最好是使用表来显示菜单或使用一些CSS黑客,我不能找到一个办法?显示菜单的最好方法是什么?我应该添加一些选项有下拉菜单使用自己的无序列表。

I have an unordered list I'm displaying horizontally as the page's top menubar. I've gotten it to display relatively well, although I've been playing with the spacing for IE6 and IE7 cause it's not displaying properly. Shocking. In either case, is it better to use a table to display the menu or use some CSS hacks, which I can't find a way around? What is the best way to display the menu? I should add some of the options have dropdown menus using their own unordered lists.

推荐答案

查看 List-a-matic ,它有许多不同的菜单模板,您可以用作基础。

Check out List-a-matic, it has a host of different menu templates that you can use as a base.

一个简单的水平列表可以使用css和无序列表显示

A simple horizontal list can be displayed using css and an unordered list

HTML

<div id="navcontainer">
 <ul id="navlist">
  <li id="active"><a href="#" id="current">Item one</a></li>
  <li><a href="#">Item two</a></li>
  <li><a href="#">Item three</a></li>
  <li><a href="#">Item four</a></li>
  <li><a href="#">Item five</a></li>
 </ul>
</div>

CSS

#navlist li
{
display: inline;
list-style-type: none;
padding-right: 20px;
}

这篇关于菜单作为无序列表水平还是表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆