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
Bosco Lo
603 PointsSome unexpected space in responsive website
Hello,
Here is a website I have made.
Link : www.twinklefit.com
There is some extra space, when I strink it down to width around 500px? When I view it on mobiles. It appear fine at first load, but you can see the extra space once you zoom out. But I couldn't find where in the script that gives the spaces.
Thanks :)
Bosco Lo
2 Answers
Garrett Sanderson
12,735 PointsHi Bosco Lo,
You are getting that extra space because over an overflow issue. You have to add an overflow hidden rule to the div that wraps your entire content area.
See code below for the fix.
.perspective {
background: #aaa;
position: relative;
overflow: hidden; // add this rule here.
}
Then that space goes away.
Bosco Lo
603 PointsOn, in addition, I had to use : overflow-x:hidden; instead, because it cut off my contents if I don't specify the x-axis. Again, thanks for the help.
Bosco Lo
603 PointsBosco Lo
603 PointsThanks I will try :)
Bosco Lo
603 PointsBosco Lo
603 PointsIt worked! Thanks a lot !