Background image dimension
I’m not quite sure what you mean “fit perfectly in the background”. If you tile the background image, you can use pretty much any size you want (within reason).
However, if you want an image that will stretch across the entire background (with no repeat), that will depend on the size of your browser window, and hence the size of your monitor. A smaller monitor will only display a part of the image, whereas a larger image will show the entire image with black space around it.
If you want a single image to stretch to cover the background, regardless of the size of the browser window, you can add this to custom CSS:
-o-background-size: 100% 100%, auto;
-moz-background-size: 100% 100%, auto;
-webkit-background-size: 100% 100%, auto;
background-size: 100% 100%, auto;
I have used this on a non-Wordpress site and it works fairly well (doesn’t work in all browers, though). Let me know how it works for you.
Ok, that partially works. It solves my problem wich is to strech the picture to the whole background area, but what i need to know is really the size, the dimension of the picture, because without that, the picture looses definition.
So, please can you tell me what are the dimensions (ex: 1024 x 480) the image must be so it fits without the necessity to repeat?
Ty for the css above.Admin
We can’t tell you the dimension of the background area, simply because there isn’t one, but countless of them.
As Ken mentioned, the width of background area depends on the width of the browser’s window, which in turn depends on the monitor’s resolution. The height on the other hand depends on the browser’s window and the amount of content you have.
Not everybody has got the same monitor size and resolution, thus there is no single dimension for the background area.ModAdminMod
Thanks to IE, there is no code that works in all browsers, just most browsers. I am constantly recommending to my readers that use IE that they upgrade to a real web browser, such as Firefox, because they are missing out on some cool features. Check out Firefox at Mozilla.org. Plus, Firefox has lots of cool addons like Firebug.
If you Google “IE hacks” you get about 18,000,000 hits. IE is a pain to web designers.
- You must be logged in to reply to this topic.