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 trialShane McC
3,005 PointsResponsive Web Design and Media Queries %s?
Hi,
I'm working on Responsive web design and I'm confused as to how the percentages are being configured regarding the project. How does Allison figure out these %'s?
/* iPhone */
@media screen and (max-width: 480px){
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
width: 100%;
}
#nav ul {
margin: 5% 0;
}
#nav ul li a {
-webkit-user-select:none;
}
#nav ul li {
float:left;
margin: 5% 0;
}
#nav ul li.about{
width: 20%;
}
#nav ul li.pricing{
width: 50%;
}
#nav ul li.locations{
width: 30%;
}
#nav ul li.contact{
width: 100%;
margin: 0;
font-size: 1em;
}
#intro-img, #about{
display:none;
}
#featured-cupcake, #new-cupcakes{
margin: 5% 0;
}
#new-cupcakes img{
max-width:95%;
}
1 Answer
Elliott Frazier
Courses Plus Student 9,647 PointsAllison covered converting pixels to percentages in this video