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.

HTML

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?

2 Answers

Dale Severude
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,323 Points

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>

Okay Thanks. But it would be a nice feature for future builds of HTML if DIV's could have a Toggle.