alonblack
alonblack

Reputation: 955

More then items selector

I want to select items based on how many divs the wrapper contains. (if "FilterEquipmentByBarcodePage" contains more then 3 "form row")

Here is the jsfiddle link:

<div id="FilterEquipmentByBarcodePage">

  <div class="form_row">
    <div>
      <input type="Text" name="Summary" class="filter_summary_search_input">
    </div>
  </div>

  <div class="form_row">
    <div>
      <input type="Text" name="Summary" class="filter_summary_search_input">
    </div>
  </div>

  <div class="form_row">
    <div>
      <input type="Text" name="Summary" class="filter_summary_search_input">
    </div>
  </div>

</div>

Upvotes: 0

Views: 38

Answers (1)

Paul van den Dool
Paul van den Dool

Reputation: 3212

You can affect items based on their quantity with CSS only with quantity queries.

Here's a great article on quantity queries

You'll want to use the nth-last-child selector with the quantity of n. In your case n+4.

Here's a jsfiddle.

I'm not sure what you mean with you want to "select items". If my example above helps great, else try explaining what you want to do exactly and I might be able to update my code.

Upvotes: 2

Related Questions