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 trialKristi Mingal
817 PointsI have two images side by side with no margin between them and no margin on the left. What am I doing wrong?
/************* PAGE PORTFOLIO *************/
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 {
margin: 20px; padding: 15%; font-size: 0.75em; color: #bdc3c7; }
4 Answers
Kristi Mingal
817 PointsThank you JH it worked.
Anirudh Bathini
904 PointsI have The same Issue, I have the same code, i even have the semi-colon, still wont work. i dunno how to resolve this.
my code is far is
/******************************************** Page : Portfolio *********************************************/
gallery {
margin:0; padding:0; list-style:none; }
gallery li{
float:left; width: 45%; margin::2.5%; background-color:#f5f5f5; color: #bdc3c7; }
Anirudh Bathini
904 PointsI got it, Sorry! i had :: after the margin, corrected that, works now :)
Kristi Mingal
817 PointsGood that you got it fixed AB. Do you need to put a space between li and { ?
Anirudh Bathini
904 PointsNo I don't think you need spaces for brackets anywhere on the html or css docs, they work fine either way. It's just a preference of how you want your code to look , and i agree that it looks better with spaces. I usually make my code pretty once i have it working.
Jennifer Hughes
11,421 PointsJennifer Hughes
11,421 PointsA quick suggestion:
You are missing a semi-colon after the margin property. Give that a try.