PDA

View Full Version : script to stretch an image to fit as a background


canadianjameson
05-08-2005, 09:28 PM
has anyone devised a script to stretch an image / change its size to have it display as a full background?

CrAzY_J
05-08-2005, 09:31 PM
cant this just be done with css?


<style type='text/css'>
body{
background-image:url(/images/background.gif);no-repeat;
}
</style>

canadianjameson
05-08-2005, 10:00 PM
perhaps

i failed to explain properly. my buddy has a logo he needs to display at 100% width of a TD... but it may tile if the users resolution is too high, he wants to avoid the tiling

heres what he wants to have 100%
http://pages.infinit.net/inca99/logo.gif

mark87
05-08-2005, 11:01 PM
To be honest, from it what it sounds like, he is using tables to display content when CSS should really be used...

canadianjameson
05-08-2005, 11:12 PM
he's created the logo for his World of Warcraft guild's website. he cant ask them to redo their entire layout in CSS at this point so he has to work with whats already there.

any ideas, CSS of other?

CrAzY_J
05-08-2005, 11:46 PM
give the td a class (Cname)

<style type='text/css'>
.Cname{
background-image:url(URL TO IMAGE);no-repeat;
}
</style>


you can change the classname here .Cname{