I'm encountering an issue with selecting the first td
in the tr
of a dynamically generated table.
I've attempted to do this using:
.record_list tbody tr td:first-child {
text-align: center;
}
However, the styles are not being applied as expected.
Here is the HTML where I'm attempting to target the td
with the check mark:
<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>second project</td>
<td>second context</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>this is a project</td>
<td>this is a context</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>