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 trialJohn Luongo
5,735 PointsHow 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>
1 Answer
Devin Gray
39,261 PointsI'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.
Kristopher Van Sant
Courses Plus Student 18,830 PointsKristopher Van Sant
Courses Plus Student 18,830 PointsHi 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. :)