background image width?

This is a discussion on "background image width?" within the Web Page Design section. This forum, and the thread "background image width? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 4th, 2007, 19:57
Junior Member
Join Date: Jul 2007
Location: zimwabee
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
background image width?

Is there a property for setting a background image width?

thanks
Reply With Quote

  #2 (permalink)  
Old Aug 5th, 2007, 08:09
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: background image width?

No, there is not. You can repeat-x, repeat-y, no-repeat and repeat.
Reply With Quote
  #3 (permalink)  
Old Aug 6th, 2007, 07:31
Junior Member
Join Date: Jul 2007
Location: Dallas, TX
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Re: background image width?

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.
Reply With Quote
Reply

Tags
background image

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
background image not big enough mykl Web Page Design 7 Oct 11th, 2007 19:08
IE 6 dont apply width in background url drpompeii Web Page Design 3 Feb 1st, 2007 15:08
background image in a div BumbleWeasle Web Page Design 5 Oct 9th, 2006 12:37
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27
Need help with my background image!!! courtjester Web Page Design 3 Sep 30th, 2003 15:25


All times are GMT. The time now is 05:04.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43