Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Is it possible to turn off or disable a <div> so you can use only the interior <div> without collapsed space?
<div class="first clearfix"> <div class="fred"> <img src="images/portfolio-1.png" alt="Marketing Project" class="one images">
<h3 class="headlines two"> Marketing Page </h3> <p class=" thre"> This project displays the marketing page of a company website for a specific business that I am interested in. </p> </div>
can I disable "first" and just access "fred" in my CSS?
Not really. If you disable a parent div you will disable all of its children as well.
An element can be disabled by adding a style to it and setting it's display to none.
<div style="display: none"></div>
You can toggle divs by using css classes.
But again, any children divs will toggle with the parent container.