Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Amandeep Dindral
8,915 PointsDisplay flex turning into display none
When I click a link to my social media icons in my nav, the display flex in the section element turns into display none and all the content within the section element disappears. I cannot figure out why this is happening. Does any one have any thoughts?
<section class="tab-content" id="articles" style="display: flex;">
3 Answers
Adam Hill
7,492 PointsDo you have any javascript running, specifically related to 'tabs' or 'tab-content'. Tabbed content is usually designed to show and reveal when links/anchors are clicked. I'm guessing that this tabbed behaviour is linked to the tab-content class.
Amandeep Dindral
8,915 PointsAdam Hill Thank you for the response. I do have JavaScript running related to tab-content. I have a show and hide between my about me and the content in the section element. It is handled by my pages.js routing system. I guess I am having a hard time seeing how that would impact my social media links in the main nav. The show and hide should only be toggling the about me and content in the section element. It should not have an effect on the other links. Am I thinking about this correctly?
Amandeep Dindral
8,915 PointsAdam Hill I figured it out! It had to do with the toggle JS. Thank You!
Adam Hill
7,492 PointsGlad you got it sorted.