![]() |
Showing background based on resolution
Hey,
I have a really big background image but I only want to show the full image to those who have the resolution for it, the others will only see partial of the image. I've seen some sites do this effect, how can I accomplish this? One perfect example is www.worldofwarcraft.com If you notice the left and right background images, they are really big but only show what you resolution can handle. Thanks :) |
that would be javascript, not php
Code:
var w = screen.width;It might just be easier to use shadowbox, as it is nice and fluid - and best of all - already written :P |
No I got it actually. Using css only :)
|
cool, css would be a pretty quick solution to it as well :)
how does it work with IE6? IE6 always seems to have an issue with positioning (well... anything you throw at it, it sometime seems) |
I'm guessing its just an image that is tiled, then you can use repeat-x to repeat the bg
|
oh sorry! I thought you were talking about the lightbox effect the page has set up... I didnt even see the background...
That is simple, all that is is multiple divs making up the background. The left background is set to position to the right and the right background is set to position to the left. This way, when a user comes to the site, they will always see the picture (at least some of it), and it always keeps down on the load time. |
with css its just setting it as a background image for the body tag and center aligning it. Then if anyone has a really large resolution you must make the choice of tiling the background or just having a solid color.
|
Quote:
|
Quote:
|
| All times are GMT. The time now is 11:03 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0