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

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

my images are not floating together

My images are not ok, my footer images are on the top right and I still get spaces between the images. I tried in different browsers but it only visible in opera.

Michael Fish
Michael Fish
7,804 Points

Hey Janette,

If you could post your html & css here we could most likely assist you.

Mike

2 Answers

Hi janette, What I would do first, and this is just me being a neat coder. is to close the img tags with a ">". Your css looks good for the most part doing a quick glance. Just make sure you close things! Some of you CSS code in missing It's closing symbol. I hope this helps.

/*****************THIS IS THE HTML OF THE INDEX.HTML*******/ /**************************I AM USING OPERA AND CHROME *************/

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Janette Noel | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Janette Noel</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section> <ul id="gallery"> <li> <img src="img/cristina1.jpg" alt "" <a href="img/cristina1.jpg"> <p> Experimentation with color and texture.</p> </li> <li> <img src="img/cristina2.jpg" alt "" <a href="img/cristina2.jpg"> <p> This is my girl.</p> </li> <li> <img src="img/cristina3.jpg" alt "" <a href="img/cristina3.jpg"> <p> This is my beautiful girl.</p> </li> <li> <img src="img/cristina4.jpg" alt "" <a href="img/cristina4.jpg"> <p> Love her</p> </li> <li> <img src="img/cristina5.jpg" alt "" <a href="img/cristina5.jpg"> <p> Cristina.</p> </li> </ul> <p> Gallery Will go Here</p> </section> <footer> <a href="http://www.google.com" class="social-icon"></a> <img src="img/Twitterlogo2.png" alt="logo"></a> <p>Ā© 2014 Janette Noel.</p> </footer> </div> </body> </html>

/*************************** THIS IS THE CSS MAIN.CSS ****************************/ / ********** GENERAL **************/ / site body */ body { background-color: #fff; color: #999; font-family: 'Open Sans', sans-serif; padding: 0; margin: 0; float: left; width: 100%; }

wrapper {

max-width:940px; margin:0 auto; padding: 0 5%; } a { color: #6ab47b; } a { text-decoration: none; }

img { max-width: 100%; }

h3 { margin: 0 0 1em 0;

}
/************* HEADING ***************/

header { float: left; margin: 0 0 30px 0; padding: 5px 0 0 0; width: 100%; }

logo {

text-align: center;
margin: 0;

}

h1 { font-family: Arial, Tahoma, Sans-serif; margin: 15px 0; font-size: 1.75em; font-weight:normal; line-height: 0.8em; }

h2 { font-size: 0.75em; margin: -5px 0 0; font-weight: normal; }

/* ************ Navigation ***************/ nav { text-align: center; padding: 10px 0; margin: 20px 0 0; } nav ul { list-style: none; margin: 0 10px; padding: 0; } nav li { display: inline-block; }

nav a { font-weight: 800; padding: 15px 10px; }

/* ************ Footer ***************/

footer { font-size: 0.75em; text-align: center; padding-top: 50px; color: #ccc; }

.social-icon { width: 20px; height:20px; margin: 0 5px; }

/* ************ Page:PORFTOLIO ***************/

gallery {

margin: 0;
padding: 0;
list-style:none;

}

gallery li {

float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;

}

gallery li a p {

}

/************** About ***************/ .profile-photo { display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }

/* ************ PAGE: CONTACT ***************/ .contact-info { list-style: none; padding: 0; margin:0; font-size: 0.9em; }

.contact-info a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px 20px; padding: 0 0 0 30px; margin: 0 0 10px; } .contact-info li.carrot a { background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACoklEQVQ4EZ1VS2sTURT+7sxkEq2laUujxeraJ21eYN2I6FKEulVc+dgI/gl/gouCOym4UFyIUl27CKWTQIvFoihtaWljtQ0mLXnNXL87yYTJdGbjgTv3PL5z7rnn3HtHIILy+fyUbdt5mrNCiBxnncMib0kpF4vFYinMVQSV6XR6TNf1WTrd8WyCqDOXTWwsNz2Vmt9zPGLgbb9S8wuZTGZG07QVL9jwuI4khxEXmLgYQ3ygb/1b9F2hz11/jF7AXC53m9t5S+OYBxgY0XD+WgLHBjuB7JZn6c3D9Jmj731Po+qC6enpEdZrnuwJz6Dm6m8HAyM6dFPAsYHyj7bf7Oevp1KpuXK5XHUzbDabz2k95Uco3mBikz8PcCPp4Gq1gZnTDuK9PfWhk6z7C6UR2Wz2HOevfWZl4Hh2qY2pIQlJXuuWb7su8MAyXF3Qh/IVjTVQR+MI3TzpIJ2UUB32ginQeEJikvowYjNzmvqEGYdiwGrNLTFsR6Jld4Io3RRLEEGZyIAxZnbh7ITrZ/v8le6w3d1/ICp3mzECup642wCcvXVXNlV3uuRUNlG1wzujIKqGlgf2z1/+CogET5HoOIv4cQjDhNANrB1E1rAUGXCH3fxTq/fWkI1D3uYYKo6JVS4WQSVVw8UIIxYqBrNid0jCTLh8odyKOjI8EcLSeLlXiX/legU+nzbbkOqKkGSzDtlu4XO5IwegYGLzjLXgFsg0zScE7ARB32oCG4cC2lAK2uAoqm2J5UoQ5coVXt2HinMDFgqFPab7OAz68Re3zFdBNg7wZs1G9zj2Qen7dGlpaasXUDGWZb1j2uoN3FWyRx+2HKw1E/guR/F63XcgO4B9+tyj70sPf6RdYQ9sZrhzTEr7ffDQB7YP4a2i5v/9BfwD8lkAfWBTrJEAAAAASUVORK5CYII=);

}

.contact-info li.mail a { background-image: }

.contact-info li.twitter a { background-image: }

/* ************ COLORS ***************/

/* green header */ header { background: #6ab47b; border-color: #599a68; }

/* nav background on mobile */ nav { background: #599a68; }

/* logo text */ h1, h2 { color: #fff; }

/* nav link / nav a, nav visted { color: #fff; } / slected nav link */ nav a.selcted, nav a:hover { color: #32673f; }

/********************************** THIS IS THE RESPONSIVE.CSS **********************************/ @media screen and (min-width: 480px) { /**************** Two COLUMN LAYOUT *******************/

#primary { width: 50%; float: left; } #secondary { width: 40% float: right; }

/******************* PAGE: PORFTOFOLIO *******************/

#gallery li { width: 28.3333% } #gallery li:nth-child(4n) { clear:left; }

/******************* PAGE: ABOUT *******************/

@media screen and (min-width: 660px) {

/******************* HEADER *******************/

nav { background: none; float: right; font-size: 1.125em; margin-right:5%; text-align: right; width:45% }