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
  • Muhammad Ali
    Muhammad Ali
    6,752 Points

    Hy there Everyone. Need help about position:absolute,Relative properties

    Posted December 5, 2020 3:16pm by Muhammad Ali
    Muhammad Ali
    6,752 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    0 Answers

  • Mechadon blaze
    Mechadon blaze
    12,604 Points

    adding width: 100% did not change .main-header.

    Posted May 28, 2019 6:37pm by Mechadon blaze
    Mechadon blaze
    12,604 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

  • Elizabeth Ramos
    Elizabeth Ramos
    7,163 Points

    setting the top padding to 68px on the body shifts everything down, including the fixed positioned main header.

    Posted June 1, 2018 12:16am by Elizabeth Ramos
    Elizabeth Ramos
    7,163 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

  • Patricia Martin
    Patricia Martin
    5,477 Points

    How to do so that fixed navigation bar doesn't cover content by clicking a button that drops to another part of the web.

    Posted February 7, 2018 11:53am by Patricia Martin
    Patricia Martin
    5,477 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

  • Zoltan Parragi
    Zoltan Parragi
    6,007 Points

    Padding or margin

    Posted January 12, 2018 10:11pm by Zoltan Parragi
    Zoltan Parragi
    6,007 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    2 Answers

  • Godfrey M
    PLUS
    Godfrey M
    Courses Plus Student 2,696 Points

    why i am un able to position my sections in the container of the body element??

    Posted October 17, 2017 10:58pm by Godfrey M
    Godfrey M
    Courses Plus Student 2,696 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    0 Answers

  • john knight
    PLUS
    john knight
    Courses Plus Student 9,155 Points

    I Fairly got a bad time positioning the header in the browser.

    Posted September 10, 2017 11:14am by john knight
    john knight
    Courses Plus Student 9,155 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

  • Daniel Amazigo
    PLUS
    Daniel Amazigo
    Courses Plus Student 11,357 Points

    why would the icon-location .svg image refuse to resize? I cleared cache and everything

    Posted April 7, 2017 3:16am by Daniel Amazigo
    Daniel Amazigo
    Courses Plus Student 11,357 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    10 Answers

  • Mukund Narasimhan
    PLUS
    Mukund Narasimhan
    Courses Plus Student 9,443 Points

    https://w.trhou.se/511g6n4xrp the logo in not going down ????

    Posted March 2, 2016 6:06am by Mukund Narasimhan
    Mukund Narasimhan
    Courses Plus Student 9,443 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    0 Answers

  • René Sánchez
    René Sánchez
    9,954 Points

    How can I position the header so that it appears fixed to the top only if i hover over the top of the viewport?

    Posted March 1, 2016 8:32pm by René Sánchez
    René Sánchez
    9,954 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    2 Answers

  • Milo Wyner
    Milo Wyner
    8,780 Points

    What are the reasons for giving the body a padding-top of 68px instead of say, giving the banner a top margin of 68px?

    Posted February 24, 2016 6:33pm by Milo Wyner
    Milo Wyner
    8,780 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    4 Answers

  • Akhter Rasool
    Akhter Rasool
    8,597 Points

    contents behind the container having fixed position remains hidden, and present behind the container.

    Posted February 10, 2016 7:16am by Akhter Rasool
    Akhter Rasool
    8,597 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

  • Richard Targett
    Richard Targett
    4,960 Points

    With media queries, is styling once enough?

    Posted December 7, 2015 4:00am by Richard Targett
    Richard Targett
    4,960 Points
    • CSS
    • CSS Layout Basics
    • Positioning Page Content
    • Fixed Positioning

    1 Answer

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