By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,315 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,315 IT Pros & Developers. It's quick & easy.

Javascript code for fitting a background image to the window

P: n/a
Hi,

I need a javascript code for fitting the background image to the
window. Help will be appreciated.

Thanks,

Mahesh
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
jo******@yahoo.com (Mahesh) writes:
I need a javascript code for fitting the background image to the
window.


window.resize(widthOfBackground,heightOfBackground );

:)
Sorry, it can't be done. There is no part of standard CSS that
allows you to scale a background image, with or without Javascript.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.