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
williamrossi
6,232 PointsBackground image too big for tablets
Hi all, I have a background image that is too big for a tablet. So the tablet seems to make the background smaller and place it right in the center of the screen. Does anyone know a way to stop this?
the background image is a dotted custom border which measures 1329px wide.
Thanks
2 Answers
David Curtis
11,301 Pointshave you tried using a media query?
Christian Frick
14,586 PointsI Load for iPads an own background with help of Media Queries
Before the ending Body-TAG in your Pagetemplate
<div class="wrap_bg"></div>
and than add the magic
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape){
body.home{
background-image: transparent !important;
}
.home .wrap_bg{
background-image: url('PFAD/bg_1024-768.jpg') !important;
position: fixed;
top: 0;
right: 0;
left: 0;
height: 768px;
background-position: 50% 0;
background-repeat: no-repeat;
z-index: -1;
}
}