请帮我解决这个乱糟糟的HTML表格
I have a simmple HTML table that I just cant seem to fix.
我有一个简单的HTML表,我似乎无法修复。
I am trying to display data like so:
我试图显示如下数据:
<-Previous Next->
51 to 100 of 10151 records
Below is the html code. I have taken out the dynamic language part that adds 'Previous' depending on what page the user is on:
下面是html代码。我已经取出了动态语言部分,根据用户所在的页面添加“上一页”:
EDIT: After all the responses I've changed the code to following. but still alignment is the same. >_<
编辑:在所有响应后,我已将代码更改为以下。但仍然对齐是一样的。 > _ <
<table width="100%" border="0">
<tbody>
<tr align="center">
<td bgcolor="#ffffff" color="white" align="center" colspan="2">
<!--some form elements go here!-->
<!--I just replaced tags with some text for testing-->
<font face="Arial" size="2"><strong>Previous</strong></font>
Previous
</td>
<td bgcolor="#ffffff" color="white" align="center" colspan="2">
Next
</td>
</tr>
<tr align="center">
<td align="center"><font face="arial" size="2"><b>51 to 100 of 10151</b> </font>
</td>
</tr>
</tbody>
</table>
Expected output is above but what I am getting from the code is:
预期的输出高于但我从代码中获得的是:
Previous Next Group
51 to 100 of 10151 Households
I have been doing trial and error for quite some time now so need some help!
我已经做了一段时间的反复试验,所以需要一些帮助!
9 个解决方案
#1
Why do you need table cells for both the Previous
and Next
text? Why not just put them in the same <td>
?
为什么上一个和下一个文本都需要表格单元格?为什么不把它们放在同一个?
<table width="100%" border="0">
<tbody>
<tr align="center">
<td bgcolor="#ffffff" color="white" align="center" colspan="2">
Previous Next
</td>
</tr>
<tr align="center">
<td align="center"><font face="arial" size="2"><b>51 to 100 of 10151</b></font></td>
</tr>
</tbody>
</table>
Did I miss a requirement?
我错过了一项要求吗?
更多相关文章
- 9.1.4 前端 - HTML body标签 - 标题,段落,分割线,换行,特殊符号,列
- Server.Htmlencode用于文本域显示带的html代码
- IOS学习之WebView加载本地HTML代码或网络资源
- html5 css3 背景视频循环播放代码
- HTML5 标签audio添加网页背景音乐代码
- 21个新奇漂亮的Ajax/CSS表格设计
- 我无法理解为什么我的代码中的单击选择文本
- js字符串与html代码互相转换时怪想法:自己解析js字符串成普通字
- 解决FCKEditor编辑器在浏览器返回时显示html源代码的问题