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

HTML How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

How do I keep the text from the 'about' section tight with the 'profile-photo'

How can I close up the gaps between my sections in this code?

@media screen and (min-width: 480px) { /*small devices, smart phones landscape*/
/*  TWO COLUMN LAYOUT */
    #primary {
        width: 50%;
        float: left;    
    }
    #secondary {
        width: 40%;
        float: right;   
    }

    /* Gallery Page(INDEX.HTML) */

    #gallery li {
        width: 28.3333%
    }

    /* Profile Picture(about.html) */
    .profile-photo {
        float: right;
        margin: 0 0 80px 5%;
    }

}
        <div id="wrapper">
            <section id="primary">
                <img src="img/profile.jpg" id="profile-photo">

            </section>
            <section id="secondary">
                <p>ABOUT 1</p>
                <p>ABOUT 2.</p>
            </section>
        </div>
        <footer>
        </footer>
    </body>
</html>
Kristopher Van Sant
Kristopher Van Sant
Courses Plus Student 18,830 Points

Hi John! Don't forget to add three back-ticks, ```, before and after your code so that it will display properly. I went ahead and edited your post here for you. :)

1 Answer

Devin Gray
Devin Gray
39,261 Points

I'm not exactly sure what you mean by this, but if you want your columns to appear closer together, you can try lowering the left margin in your .profile-photo class.