使用div或表来包含链接列是否更好? [英] Is it better to use divs or tables to contain columns of links?

查看:151
本文介绍了使用div或表来包含链接列是否更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面底部有3列链接。每列都放入一个div中,所有三个div都被包装成一个以页面为中心的大div。这是一个更适合表格的东西,还是一个表格错误的工作元素?

I have a page with 3 columns of links at the bottom. Each column is put into a div and all three divs are wrapped into a big div that is centered on the page. Is this something that is better suited to a table or is a table the wrong element for the job?

推荐答案

你也可以使用 < ul> & ; < li> 这个。

You can also use <ul> & <li> for this.

#horizontal {
    width: 100%;
    background: #eee;
    float: left;
}

#horizontal ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 12em;
    float: left;
}

这将使用li元素创建水平列,然后你可以填充HTML在每个li中创建单独的链接。

This will create horizontal columns using li elements, and then you can stuff the HTML to create individual links in each li.

这篇关于使用div或表来包含链接列是否更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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