[英]Can't get first td in tr with css3 selectors
I am having an issue selecting the first td
in the tr
on a table that is being created. 我在选择要创建的表中tr
的第一个td
时遇到问题。
I am using 我在用
.record_list tbody tr td:first-child { text-align: center; }
and that does not work. 那是行不通的。 No styles are being applied. 没有样式被应用。
here is the html, im trying to get the td
with the check mark. 这是html,即时通讯试图获取带有复选标记的td
。
<table class="records_list">
<thead>
<tr>
<th>✔</th>
<th>Title</th>
<th>Notes</th>
<th>Project</th>
<th>Context</th>
<th>Flagged</th>
<th>Deferuntil</th>
<th>Due</th>
<th>Repeattask</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>✔</td>
<td>This is another task title</td>
<td>this is another note that will go with this task, just so nothing is forgotten.</td>
<td>secondproject</td>
<td>secontcontext</td>
<td>1</td>
<td></td>
<td>2014-02-12 08:17:00</td>
<td></td>
<td>
<ul>
<li>
<a href="/workspace/symfony/web/task/10">View</a>
</li>
<li>
<a href="/workspace/symfony/web/task/10/edit">Edit</a>
</li>
</ul>
</td>
</tr>
<tr>
<td></td>
<td>Lorem ipsum dolor sit amet</td>
<td>this is a note that will describe anything that needs to be remembered about the note.</td>
<td>thisisaproject</td>
<td>thisisacontext</td>
<td>1</td>
<td></td>
<td></td>
<td></td>
<td>
<ul>
<li>
<a href="/workspace/symfony/web/task/9">View</a>
</li>
<li>
<a href="/workspace/symfony/web/task/9/edit">Edit</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
You have a typo records_list: 您有一个错字记录列表:
Change: 更改:
.record_list tbody tr td:first-child { text-align: center; }
With: 带有:
.records_list tbody tr td:first-child { text-align: center; }
这是一个错误类型.record_list
而不是.records_list
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.