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!

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


image not visible on ipads

l have created a website that got a banner image with the following code:

.banner-main {
width: 100%;
float: left;
position: relative;
background: url(../img/home/1.jpg) no-repeat;
height: 800px;
-webkit-background-size: cover; 
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover; 
 background-attachment: fixed; 

The image appears alright on bigger screens but in smaller screens like ipad its been zoomed in too much that the image cannot be viewed.

3 Answers

Stephan Kuster
Stephan Kuster
7,168 Points

Is it possible that you can give some more information? Maybe a link to the website so we can see how it looks.

Stephan Kuster
Stephan Kuster
7,168 Points

Could it be that the fixed height is causing the problem?

Maude Theberge
Maude Theberge
7,755 Points

Could you post your html code?