表格行的宽度为2列,并且超过了第一行(1)确定的列数, [英] A table row was 2 columns wide and exceeded the column count established by the first row (1)

查看:195
本文介绍了表格行的宽度为2列,并且超过了第一行(1)确定的列数,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想验证我的页面,但w3c一直给我这个警告。我想摆脱它,但我似乎无法找到它的原因。



它给了我这个错误:


表格行的宽度为2列,并超过第一行(1)确定的列数。


表格和CSS代码:

 <表> 
< tr>
< td>联络资讯< / td>
< tr>
< td> Adres:< / td>
< td> Jan van der Heydenstraat 61< / td>
< tr>
< td>邮政编码:< / td>
< td> 1223 BG< / td>
< tr>
< td> Plaats:< / td>
< td> Hilversum< / td>
< tr>
< td>电子邮件:< / td>
< td> info@blabla.nl< / td>
< tr>
< td> Telefoon:< / td>
< td> 06-31903706< / td>
< / tr>
< / table>

表{
border:none;
padding-left:75px;}

td:first-child {
width:135px;
border:none;
text-align:left;}

td + td {
border:none;
text-align:left;}

任何建议? $ b

解决方案

它意味着它的意思。表格中的其中一行有太多列。具体来说,第一行的列数少于后续行。但是,除非您发布一些代码,否则我们不能做太多事情。



编辑

表格的标记不正确。


  • 您在第一行中只有一个单元格(或者执行PeeHaa建议的操作)
  • 需要用< / tr>


关闭每个

I want to validate my page but w3c keeps giving me this warning. I want to get rid of it but I can't seem to find the cause of it.

It gives me this error:

A table row was 2 columns wide and exceeded the column count established by the first row (1).

Table and CSS code:

<table>
    <tr>
    <td>Contact informatie</td>
    <tr>
    <td>Adres:</td>
    <td>Jan van der Heydenstraat 61</td>
    <tr>
<td>Postcode:</td>
<td>1223 BG</td>
<tr>
<td>Plaats:</td>
<td>Hilversum</td>
<tr>
<td>Email:</td>
<td>info@blabla.nl</td>
<tr>
<td>Telefoon:</td>
<td>06-31903706</td>
</tr>
</table>

table {
    border:none;
    padding-left:75px;}

td:first-child {
    width:135px;
    border:none;
    text-align:left;}

td+td {
    border:none;
    text-align: left;}

Anyone any suggestions?

解决方案

It means exactly what it says. One of the rows in your table has too many columns. Specifically, the first row has less columns that a subsequent row. But we can't do much unless you post some code.

Edit

The markup for the table is incorrect.

  • You only have one cell in the first row (or do what PeeHaa suggested)
  • You need to close off each row with </tr>

这篇关于表格行的宽度为2列,并且超过了第一行(1)确定的列数,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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