Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

random background image

Options
  • 17-03-2004 4:53am
    #1
    Closed Accounts Posts: 2,464 ✭✭✭


    Im trying to setup a homepage with a dynamic background which is easy enough to do with java but I want to be able to position is in the bottom right hand corner which is easy to do with css.

    The problem is I want to do both, ive seen it done before but cant seem to find anyway to do it. Any help would be appricated.


Comments

  • Closed Accounts Posts: 304 ✭✭Zaltais


    [PHP]
    <script type="text/javascript">
    //Some script to randomly generate an image path
    var bgimg = '/path/to/randomly/selected/image.gif';
    document.body.style.backgroundImage=bgimg;
    </script>
    [/PHP]


    Completely untested etc. but should be what you're looking for.


  • Closed Accounts Posts: 2,525 ✭✭✭JustHalf




Advertisement