Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Roald Jurrian Kamman
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Roald Jurrian Kamman
    Front End Web Development Techdegree Graduate 15,544 Points

    I prefer just giving classes to specific elements in the HTML.

    Posted June 30, 2020 6:16pm by Roald Jurrian Kamman
    .a{fill-rule:evenodd;}techdegree seal-36
    Roald Jurrian Kamman
    Front End Web Development Techdegree Graduate 15,544 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    2 Answers

  • Robert O'Toole
    Robert O'Toole
    6,366 Points

    index number

    Posted January 8, 2020 6:42pm by Robert O'Toole
    Robert O'Toole
    6,366 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    2 Answers

  • mk37
    mk37
    10,271 Points

    So confused with the MDN :nth-last-child() example?

    Posted January 9, 2019 1:10pm by mk37
    mk37
    10,271 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    2 Answers

  • babasariffodeen
    babasariffodeen
    6,475 Points

    Bravo Guil for the great explanation!

    Posted March 13, 2018 10:01pm by babasariffodeen
    babasariffodeen
    6,475 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    2 Answers

  • gene c
    gene c
    13,630 Points

    What is the difference between the CSS property background and background-color?

    Posted December 20, 2017 4:31pm by gene c
    gene c
    13,630 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    1 Answer

  • Ivana Lescesen
    Ivana Lescesen
    19,442 Points

    Is it better to use classes or descendant selectors

    Posted August 5, 2016 5:52pm by Ivana Lescesen
    Ivana Lescesen
    19,442 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    3 Answers

  • Charlie Sattgast
    Charlie Sattgast
    7,205 Points

    Unsolved :nth-child problem

    Posted May 10, 2016 6:33pm by Charlie Sattgast
    Charlie Sattgast
    7,205 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    3 Answers

  • Sean Flanagan
    Sean Flanagan
    33,237 Points

    Can't change the even-numbered list items

    Posted May 26, 2015 10:35pm by Sean Flanagan
    Sean Flanagan
    33,237 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    3 Answers

  • Göran Joelsson
    Göran Joelsson
    11,710 Points

    How about if I would like to target a <li> which is in a parent called <section>, but where there are several <sections>

    Posted April 22, 2015 2:29pm by Göran Joelsson
    Göran Joelsson
    11,710 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    2 Answers

  • Michael Trier-hofby
    Michael Trier-hofby
    2,251 Points

    I lol´d at the argument joke...

    Posted March 11, 2015 9:57pm by Michael Trier-hofby
    Michael Trier-hofby
    2,251 Points
    • CSS
    • CSS Selectors
    • Advanced Selectors
    • :nth-child

    0 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord