使用Div显示表格式数据 [英] Using Divs to display table-like data

查看:119
本文介绍了使用Div显示表格式数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示以下数据:

 Title     Subject    Summary    Date

所以我的 HTML 看起来像:

<div class="title"></div>
<div class="subject"></div>
<div class="summary"></div>
<div class="date"></div>

问题是,所有文本不会出现在一行。我尝试添加 display =block,但这似乎不起作用。

The problem is, all the text doesn't appear on a single line. I tried adding display="block" but that doesn't seem to work.

这里?

重要提示:在此示例中,我不想使用元素但贴上 div 标签。

Important: In this instance I dont want to use a table element but stick with div tags.

推荐答案

想要显示表,对吗?因此,请先使用< table>

It looks like you're wanting to display a table, right? So go ahead and use the <table> tag.

这篇关于使用Div显示表格式数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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