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

HTML How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Jeffrey Hall
Jeffrey Hall
2,775 Points

Margin is working, but images are not changing sizes.

After watching the video, my website does not look like the teacher's. Whereas his images are shrunken down, mine are still incredibly large and overlapping. Additionally, my footer has somehow been placed in the middle of the bottom picture.

Here is a link to a snapshot of my workplace: https://w.trhou.se/qkmgawv5d2

3 Answers

samiff
samiff
31,206 Points

Hey Jeffrey, looking at your main.css code I see the following:

images {
  max-width: 100%;
}

silly syntax :smile:

Jeffrey Hall
Jeffrey Hall
2,775 Points

Thank you SO much. I appreciate your help.

I had the same problem thank you SOOOO much !!

Hi Jeff-

Two questions:

1.) Did you add the responsive .css? Either by clicking it to bring it into workspaces and linking to it in the html (after main.css)? 2.) If yes to the items above, did you float your columns in the two column layout? Also did you set widths to your li (photos)?

This is the final responsive css:

@media screen and (min-width: 480px) {
  /****************************
  TWO COLUMN LAYOUT
*****************************/


  #primary{
    width:50%;
    float: left;
  }

  #secondary{
    width: 40%;
    float:right;
  }


/****************************
  PAGE:PORTFOLIO
*****************************/ 

#gallery li{
    width: 28.3333%;
  }

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

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

  .profile-photo{
    float: left;
    margin: 0 5% 80px 0;
  }


}

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

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

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

  #logo {
    float: left;
    margin-left: 5%;
    text-align: left;
    width: 45%;
  }

  h1{
    font-size: 2.5em;
  }

  h2{
    font-size: 0.825em;
    margin-bottom: 20px;
  }

  header{
    border-bottom: 5px solid #599a68;
    margin-bottom: 60px;
  }

}
Kristopher Van Sant
Kristopher Van Sant
Courses Plus Student 18,830 Points

Hey MIke, moved your answer to the answer section so that it can be voted on and possibly marked "Best Answer"

Cool. I probably need to pay attention to where I'm posting in the future! haha