Javascript code for fitting a background image to the window

Discussion in 'Javascript' started by Mahesh, Sep 6, 2003.

  1. Mahesh

    Mahesh Guest

    Hi,

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

    Thanks,

    Mahesh
     
    Mahesh, Sep 6, 2003
    #1
    1. Advertising

  2. (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 -
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Sep 6, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. To Forum
    Replies:
    3
    Views:
    408
    Peter Jansson
    Jul 18, 2004
  2. Ganesh

    Image not fitting right..

    Ganesh, Oct 30, 2006, in forum: HTML
    Replies:
    8
    Views:
    340
    Ganesh
    Dec 4, 2006
  3. jc
    Replies:
    3
    Views:
    1,743
  4. jc
    Replies:
    1
    Views:
    1,377
    Neredbojias
    Mar 19, 2008
  5. Raja Kannan

    IFRAME fitting in a window

    Raja Kannan, Jul 4, 2004, in forum: Javascript
    Replies:
    0
    Views:
    74
    Raja Kannan
    Jul 4, 2004
Loading...

Share This Page