Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 





Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
Thread Tools
Old 08-26-2008, 04:31 PM   #1 (permalink)
Registered User
 
Join Date: Aug 2008
Posts: 129
OS: Windows XP SP3


Send a message via AIM to rlaserra
[Solved]Expandable Background

I have a background image that is a simple gradient black to gray, I want it to be able to stretch no matter what screen size to fit the background with no scroll bars. I am using Visio Studio and I have Dreamweaver CS3 can someone explain this to me? I could see if I split it in three colums but what about height wise it gets me really confused. I know Id have to use .css file someone please help out! Thanks
rlaserra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-27-2008, 02:48 PM   #2 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: Expandable Background

Hey, is the gradient verticle or horizontal... either way this would work(you'd just have to modify it if the gradient is horizontal[but that's as easy as changing an x to a y):

within your html file you could add this code(within the head section of the page[if you don't know how to write html/css i highly suggest you learn[if you have the time], there are some great tutorials here: www.w3schools.com ):
Code:
<style type="text/css">
/*Adds the style to the body element of the page */
BODY{
/*This adds the image to the page, myimage.jpg should be replaced with your image's name*/
background-image: URL("myimage.jpg");
/*This "Repeats" the image along the x axis(horizontally, change "x" to "y" if the gradient is horizontal)*/
background-repeat: repeat-x;
}
</style>
Cheers,
Jamey
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-28-2008, 07:59 AM   #3 (permalink)
Registered User
 
Join Date: Aug 2008
Posts: 129
OS: Windows XP SP3


Send a message via AIM to rlaserra
Re: Expandable Background

what if the image is not big enough to cover vertically? Will it stretch? Because I have a gradient that is vertical fading black to gray and I want it to be able to be used by everyone... Is there a perticular size that I should make the graident or will it stretch?
rlaserra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-28-2008, 08:04 AM   #4 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: Expandable Background

hey, when i've done this before i've used a gradient from say #000000(black) to #AAAAAA(light grey) and then set the background colour (which would go behind the image) as #AAAAAA so that when the gradient runs out it's just the solid colour...

So the code is something like:
Code:
background-image: URL("background.jpg");
background-repeat: repeat-x;
background-color: #AAA;
And the image background.jpg would be a gradient from black to light grey vertically where grey is at the bottom... of course #AAA would become your background colour...

Cheers,
Jamey

p.s. i don't think theres an actual way to stretch the image.
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-29-2008, 07:39 AM   #5 (permalink)
Registered User
 
Join Date: Aug 2008
Posts: 129
OS: Windows XP SP3


Send a message via AIM to rlaserra
Re: Expandable Background

yeah that seems like it would do the trick. Thank you jamie! Ciao!
rlaserra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 08-29-2008, 04:15 PM   #6 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Northampton, UK
Posts: 1,090
OS: Win Vista Home Premium & Ubuntu Hardy(8.04)


Re: Expandable Background

Tis kay, glad to help =]

Cheers much,
Jamey
__________________

Help fight cancer. < I just started =]
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


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

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



All times are GMT -7. The time now is 03:38 PM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82