Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] [class*='grid-']:last-of-type Reply To: [class*='grid-']:last-of-type

#150440
sadunaresh
Participant

@paulie…

I have my answer in your reply…

I wanted the last of type to apply only for last child(in a parent with class name starting with grid-) with class name that starts with grid-.

It works fine in following cases

   <div class="grid-"></div>
   <div class="grid-"></div>

or

<div>
</div>

but it doesn’t work for following

<div>
</div>

as children are of different element types… yes by last-of -type it is targeting last child of each element type with [class*=’grid-‘], with in a container….

thank you, very much…