Skip to main content

Forums

This topic contains 2 replies, has 2 voices, and was last updated by  Ricky55 3 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #237734

    Ricky55
    Participant

    Hi guys

    Is there a better or more efficient way of achieving this?

    I’m basically wanting to select the first item in each row to remove its margin, marked in teal in my example. I’ve got it working with a bit of a hack but this content will be dynamic so it won’t really work long time.

    I thought using nth child 7 would work but because of the odd number of items it doesn’t. Well I think thats why.

    Take a look at my pen http://codepen.io/qwerty-design/pen/JGmYwo

    Any tips most appreciated.

    Thanks

    Richard

    #237738

    cwc
    Participant

    try nth-child(6n+1)

    #237742

    Ricky55
    Participant

    Thanks man you’ve cracked it! Deadline looming and I wanted something more robust than the hack I was using.

    Thanks again very much appreciated!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star