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 trialsrikanthpunuru
4,182 PointsMy About page is not responsive , please help me
Here is my CSS code: I think I have followed tutorial as it is. picture stays in the middle. It is not moving left as we see in tutorial.
@media screen and (max-width: 480px) {
/* ****************************
TWO COLUMN LAYOUT
***********************************/
#primary {
width: 50%;
float: left;
}
#secondary {
width: 40%;
float: right;
}
/* ********************************
PAGE: PORTFOLI
***********************************/
#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: 52.5%%;
}
#logo {
float: left;
margin-left: 5%;
text-align: left;
width: 42.5%
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 0.825em;
margin-bottom: 20px;
}
header {
border-bottom: 5px solid #599a69;
margin-bottom: 60px;
}
}
6 Answers
richardwheeler
8,332 PointsYour very first line should be min-width not max width
@media screen and (min-width: 480px) {
katiaalamir
7,091 PointsThe problem could have been that you missed something in your HTML then. Sometimes I validate my code to debug potential syntax errors: https://validator.w3.org/#validate_by_input
Hope this helps! Otherwise share the HTML with us!
richardwheeler
8,332 PointsThat's a good tool, thank you Katia! Good suggestion. I would be happy to check your HTML though if you would like srikanthpunuru.
srikanthpunuru
4,182 PointsI feel problem might be with Launch Editor / treehouse editor. I have processed my code in codepen. It works fine.
richardwheeler
8,332 PointsYes and no. I've seen issues come up depending on the browser you use and network settings as well. But as long as you know ya got it right. Hope you have a good day! Feel free to ask me for assistance in the future too!
kate tychanska
5,694 PointsHi, I had the same problem but i checked the responsive.css file implementation i html code. I found few small syntax errors. Now it works.
srikanthpunuru
4,182 PointsI had a problem with only about page. everything worked fine. But I run the problem outside treehouse workspace, about me was responsive.
richardwheeler
8,332 Pointsrichardwheeler
8,332 PointsHere's my completed CSS
srikanthpunuru
4,182 Pointssrikanthpunuru
4,182 PointsYes, I tried with your suggestion. Nothing is changed. Except About page everything is responsive. Do I need to share my html file?