How to set page's background with image

How to set page's background with image

  

Dear all

I have imported an image to my module.

and want to make the image as the page's background.

I have searched the key word [background] from Forums,there are some posts for container but not for page.


I got it.

I added this to Page.javaScript property.

    $(document).ready(function() {
        $('body').css('background-image', 'url(/MHPS/img/background.png)');
    });
Solution

Why didn't you just add it to to your page css stylesheet?


Should be something like this:

body {
    background-image: url('/MHPS/img/background.png');
}
Solution

João Rosado wrote:

Why didn't you just add it to to your page css stylesheet?


Should be something like this:

body {
    background-image: url('/MHPS/img/background.png');
}

Thank you for your answer.

I think this is the better method.

I have tried it, it worked well. 

Thank you very much.