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!

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 Styling Web Pages and Navigation Style the Image Captions

Images not displaying side by side - just one on top of the other

oN a previous post, someone suggest I write the following - li {display: inline-block;}

I wrote this after

gallery li {

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

but it did nothing.

1 Answer

If you provide your full html and css documents, someone can give you a concise answer. By the looks of what you wrote, "gallery" is either a class or an id and you have a list item inside of it. If gallery is an id, use #gallery li instead, but if it's a class use .gallery li. You also didn't close the curly brace for that command, but that could also be a copy and paste error. I can't know for sure unless you post the rest of your code to see!