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

I need a little help with the Gallery

Okay so there is two things I need help with the link to my code is in the desc. To find where I am talking about in my code go to the css folder and click main.css.

OKAY, so there are two things I need help with. His tutorial is base on pictures that are his size but my pictures are 1920x1080 so I need to know how to fix it so that they fit like the video shows. Next if you were to use the exact code I have the top of the pages navigation is messed up. The only nav you see is portfolio and that is the page I am on you can't see the other ones which are contact and about me. And I tested which of the lines made it do this and it is this section. You can find it under the part that says....

/********************************************************** PAGE: Portfolio **********************************************************/

gallery li {

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

Please respond as soon as you can. Here is the codes link... https://w.trhou.se/2kcovb21g3

Okay sorry about that but I fixed the error but I still need to know how to fit two of the 1080p pics beside eachother and still have room on the sides of the page if you don't know what I mean check out the video and you will see that two pictures are side by side but that's because his pics are smaller so how do I fit two bigger pics the same way he did without changing the pictures dimensions.

1 Answer

Robert Vaida
Robert Vaida
8,718 Points

Hello Jordan

You can try to put the 2 pictures in 2 separate div elements. Than give a specific width and height to those divs. After that select your 2 pics and give them a max-width property with a value of 100%.

Try it and tell me how it goes.