Francis Gallagher Francis Gallagher - 1 year ago 102
CSS Question

how to select the 2nd child Div of a div using CSS

I am trying to style a div in wordpress. As you cant give anything IDs I have to select to using CSS3

Selector. I am trying to target the third div
My css rules I am trying but it not working any ideas where I am going wrong

#ninja_forms_form_175_all_fields_wrap:nth-of-type(2) {
padding: 0px;

<div id="ninja_forms_form_175_all_fields_wrap" >
<div class="ninja-row">
<div class="ninja-col-1-2">

Answer Source

try this: #ninja_forms_form_175_all_fields_wrap>div:first-of- type>div: first-of-type

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download