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 Responsive Web Design and Testing Responsive Web Design

Tracey McEntyre
Tracey McEntyre
1,757 Points

pictures still same when screen is large

My pictures are not re sizing as the screen gets larger.

Tracey McEntyre
Tracey McEntyre
1,757 Points

I forgot to add my code /****************** GENERAL *******************/

body { font-family: 'Roboto Slab', serif; }

wrapper {

max-width: 940px; margin: o auto; padding: 0 5%; }

a { text-decoration: none; }

img { max-width: 100%; }

h3 { margin: 0 0 1em 0; }

/****************** Heading *******************/

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

logo {

text-align: center; margin: 0; }

h1 { font-family: 'Indie Flower', cursive; 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 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; clear: both; padding-top: 50px; color: #ccc; }

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

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

gallery {

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

gallery li {

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

gallery li a p {

margin: 0; padding: 5%; font-size: 0.75em; color: #bdc3c7; }

/****************** PAGE: 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.phone a { background-image: url('../img/phone.png'); }

.contact-info li.mail a { background-image: url('../img/mail.png'); }

.contact-info li.twitter a { background-image: url('../img/twitter.png'); }

/****************** Colors *******************/

/* site body */ body { background-color: #fff; color: #999; }

/* dark red header */ header { background: #7f0000; border-color: #a9a9a9; }

/* nav background on mobile */ nav { background: #a9a9a9; }

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

/* links */ a { color:#7f0000; }

/* nav link */ nav a, nav a: visited { color: #a9a9a9; }

/* selected nav link */ nav a.selected, nav a:hover { color: #fff; }

3 Answers

I expect the problem is in your html. Can you share that please?

Tracey McEntyre
Tracey McEntyre
1,757 Points

my gallery is not creating a third row. the images get smaller. I'm not quite sure how to share my screenshot to explain. here's my responsive.css

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

/******************** TWO COLUMN LAYOUT ********************/

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

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

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

#gallery { width: 28.3333%; }

}

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

}

James Siminak
James Siminak
1,312 Points

From the code you have provided, it appears that you have omitted the "hash" (#) at the beginning of ID selectors on your CSS rules. In specific, your CSS rule which impacts image size in the gallery:

gallery li { float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #d3d3d3; }

Should be written with a hash beginning the selector, as such:

gallery li {

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

}

You may want to go through all your CSS and make sure that all ID selectors begin with a hash, so that the indicated styling is applied to the HTML.

Hope this helps!

Cordially,

James

Tracey McEntyre
Tracey McEntyre
1,757 Points

Thank you all. I sorted it out. Very silly mistake