Charlie019,
I don't know why you would want to set the size of a background image unless perhaps you didn't have access to a graphics program. (Which would be the easiest way to get your background exactly the size you wanted.)
While there is no way to set the background image, if we think outside the box for a moment there
are ways to 'fake it' and get the same result.
I'm assuming you have a nifty image you want to use as a background image but it's too wide for your page.
(For the sake of this explaination, let's say your background image is 1200px wide, but your website is only going to be 990px wide)
You can fix this by putting the image in a 'container' div around the rest of your code and setting the width of that to (for example) 990px instead of puttting the background in the body itself like so:
- Code: Select all
<body>
<div id="backgroundWorkaround">
(your regular code goes here)
</div>
</body>
The
CSS for this example might look something like this:
- Code: Select all
#backgroundWorkaround
{
width:990px;
background-image:url('/images/bg_tooWide.gif');
background-repeat: repeat-y;
}
Now your background will repeat/tile vertically and the extra 210px won't be seen.
I don't know if this is what you are trying to accomplish, but I hope it helped.