How to make to fit, and no repeat.

Discussion in 'JavaScript' started by Lucky_romania, Nov 28, 2009.

  1. #1
    <a href="" onMouseOver="document.body.background='http://www.travelblog.org/Wallpaper/pix/tb_fiji_sunset_wallpaper.jpg'">SunSet</a>


    This script change your background, but it repeats, it`s not stable and don`t fit in page.
    I want to be static and no repeat.

    If anybody help..

    Thanks
     
    Lucky_romania, Nov 28, 2009 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    you can specify background-repeat as no-repeat in css of body, however i feel image size and client resolution size can create problem if you have kept a fluid design.

    If screen resolution is fixed then little css tweaks can make it correct.

    background-repeat: no-repeat;
    width:100%;
    height:100%;
     
    mastermunj, Nov 29, 2009 IP