CSS- Select only direct nth child(s)

#SearchResultTableBody > tr > td > div:nth-child(3) {
    margin-left:10px;
}
<table>
    <tbody id="SearchResultTableBody">
        <tr>
            <td>
                <div> <!--This div will not be selected-->                   
                </div>

                <div> <!--This div will not be selected--> 
                </div>

                <div> <!--Only this div will be selected-->
                    <div> <!--This div will not be selected--> 
                        <div> <!--This div will not be selected--> 
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </tbody>
</table>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s