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

CSS

iphone parallax

I have a parallax effect for my site and it looks fine on desktop but on my iphone the parallax image is way way to big so that you cant even notice the parallax effect (plus the image is so large you cant even discern what the photo is of). Does anyone have a solution for this? You can see what my problem is at sharkysbarandgrill.com and my parallax code I use is below.

// setting base styles to image containers
[class*="bg__"] {
  height: 55vh;

  text-indent: -9999px;

  /* fix background */
  background-attachment: fixed;

  /* center it */
  background-position: center center;

  /* Scale it nicely to the element */
  background-size: cover;

  /* just make it look a bit better ;) */
  &:nth-child(2n) {
    box-shadow: inset 0 0 1em #111;
  }
}

.bg__homeMenu {
  background-image: url(
    url("images/brickwall.png")
  );

}

.bg__drinkFood {
  background-image: url(
    images/brick-background2.png
  );
  margin-top: 2%;  /*seprates the drinks menu from the parallax image*/

}

.bg__foodevent {
  background-image: url(
    images/pagoda-night.png
  );
}

.bg__bazz {
  height: 100vh;

  background-image: url(
    https://s3-us-west-2.amazonaws.com/s.cdpn.io/30354/parallax1.jpg
  );
}