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 trialDaniel Flynn
Front End Web Development Techdegree Student 4,900 PointsIs 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?
2 Answers
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,350 PointsNot 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>
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,350 PointsYou can toggle divs by using css classes.
But again, any children divs will toggle with the parent container.
Daniel Flynn
Front End Web Development Techdegree Student 4,900 PointsDaniel Flynn
Front End Web Development Techdegree Student 4,900 PointsOkay Thanks. But it would be a nice feature for future builds of HTML if DIV's could have a Toggle.