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
  • Cool Beans
    Cool Beans
    6,937 Points

    i am trying to understand how can I move .btn elements to the center. Tried everything and does not work.

    Posted July 19, 2024 2:54pm by Cool Beans
    Cool Beans
    6,937 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Sean Fallon
    Sean Fallon
    8,516 Points

    Some elements don't work with child selectors. Example div ~ h1 p > h1 and so on.

    Posted May 29, 2021 8:28pm by Sean Fallon
    Sean Fallon
    8,516 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    4 Answers

  • Ubo Town
    Ubo Town
    3,227 Points

    .btn

    Posted January 27, 2021 12:36am by Ubo Town
    Ubo Town
    3,227 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • Jake Almendarez
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jake Almendarez
    Front End Web Development Techdegree Student 4,250 Points

    button element or input type submit?

    Posted June 12, 2020 1:30am by Jake Almendarez
    .a{fill-rule:evenodd;}techdegree
    Jake Almendarez
    Front End Web Development Techdegree Student 4,250 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • Shung Chen
    Shung Chen
    6,527 Points

    What is the diff between these selectors: "ol li" and "ol~li"

    Posted May 27, 2020 3:50am by Shung Chen
    Shung Chen
    6,527 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • Delicia Wharton
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Delicia Wharton
    UX Design Techdegree Student 11,098 Points

    Still can't get adjacent buttons to work (btn + btn)

    Posted March 3, 2020 2:30am by Delicia Wharton
    .a{fill-rule:evenodd;}techdegree
    Delicia Wharton
    UX Design Techdegree Student 11,098 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Dwi Andreas Prawiranegara
    Dwi Andreas Prawiranegara
    7,181 Points

    Combinator for multiple children

    Posted April 1, 2018 3:21am by Dwi Andreas Prawiranegara
    Dwi Andreas Prawiranegara
    7,181 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • ian izaguirre
    ian izaguirre
    3,220 Points

    I do not understand the difference between a child and a sibling ?

    Posted September 3, 2017 4:33am by ian izaguirre
    ian izaguirre
    3,220 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Ben Mohammad
    Ben Mohammad
    5,659 Points

    why does my login button follow the adjacent sibling/or child when i only want the reset button to follow suit.

    Posted May 20, 2017 2:02pm by Ben Mohammad
    Ben Mohammad
    5,659 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • Matthew Keys
    Matthew Keys
    1,922 Points

    Confusion with the ".btn + .btn"

    Posted March 21, 2017 1:58pm by Matthew Keys
    Matthew Keys
    1,922 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Shahar Golan
    Shahar Golan
    819 Points

    inline-block

    Posted March 2, 2017 2:03pm by Shahar Golan
    Shahar Golan
    819 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • deepak sharma
    deepak sharma
    3,844 Points

    why dont be use margin-right in adjacent selector in .btn + .btn.. and why is it not working

    Posted December 31, 2016 1:16pm by deepak sharma
    deepak sharma
    3,844 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Jiho Song
    Jiho Song
    16,469 Points

    What is the difference between using ~ and just writing down the specific type name? <CSS>

    Posted December 30, 2016 2:20am by Jiho Song
    Jiho Song
    16,469 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Kailash Seshadri
    Kailash Seshadri
    3,087 Points

    Difference between using a space and a ~ symbol

    Posted July 9, 2016 9:26am by Kailash Seshadri
    Kailash Seshadri
    3,087 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Kailash Seshadri
    Kailash Seshadri
    3,087 Points

    Adjacent Sibling Combinators

    Posted July 9, 2016 9:16am by Kailash Seshadri
    Kailash Seshadri
    3,087 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    1 Answer

  • Dylan Carter
    Dylan Carter
    4,780 Points

    I don't get what the difference is in using the > for children instead of just putting a space like we were doing?

    Posted May 15, 2016 1:20am by Dylan Carter
    Dylan Carter
    4,780 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    3 Answers

  • Dylan Carter
    Dylan Carter
    4,780 Points

    So, its best to use only class selectors?

    Posted May 14, 2016 11:11pm by Dylan Carter
    Dylan Carter
    4,780 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Karen Spicer
    Karen Spicer
    5,548 Points

    Cascade Importance, Specificity and Order

    Posted September 29, 2015 6:45pm by Karen Spicer
    Karen Spicer
    5,548 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    4 Answers

  • Ary de Oliveira
    PLUS
    Ary de Oliveira
    Courses Plus Student 28,304 Points

    Syntax Definition Command

    Posted September 10, 2015 11:57am by Ary de Oliveira
    Ary de Oliveira
    Courses Plus Student 28,304 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Sean Flanagan
    Sean Flanagan
    33,237 Points

    General Sibling Combinators

    Posted May 25, 2015 7:40pm by Sean Flanagan
    Sean Flanagan
    33,237 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    2 Answers

  • Hammad Ahmed
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Hammad Ahmed
    Full Stack JavaScript Techdegree Student 11,910 Points

    Difference between Descendant and Child selectors

    Posted March 14, 2015 5:05pm by Hammad Ahmed
    .a{fill-rule:evenodd;}techdegree
    Hammad Ahmed
    Full Stack JavaScript Techdegree Student 11,910 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Child, Adjacent, and General Sibling Combinators

    3 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