Different background on homepage??

Hi all, its probly really simple but how do i set it so i can have a different main background colour/image on the homepage than to all the other pages on a site?? Thanks in advance :)

You Creature!!
Quote · 23 Mar 2014

You can override the body tag for the home page on page_1.html of the template.

Geeks, making the world a better place
Quote · 23 Mar 2014

 

You can override the body tag for the home page on page_1.html of the template.

 sounding stupid now but how would i go about doing that please? thanks

You Creature!!
Quote · 23 Mar 2014

If your template does not have the page_1.html file, copy it from the base template.

 

You will see this code:

<bx_include_auto:_sub_header.html />
    __page_main_code__
<bx_include_auto:_sub_footer.html />

 

After <bx_include_auto:_sub_header.html /> place your inline style declaration.

<style>
body {background-image:url("images/background.gif");}
</style>

Replace images/background.gif with the actual url to the file you want to use as a background image.

You can look up background-image or background on the W3C school site; http://www.w3schools.com/css/css_howto.asp

 

Geeks, making the world a better place
Quote · 23 Mar 2014

 

If your template does not have the page_1.html file, copy it from the base template.

 

You will see this code:

<bx_include_auto:_sub_header.html />
    __page_main_code__
<bx_include_auto:_sub_footer.html />

 

After <bx_include_auto:_sub_header.html /> place your inline style declaration.

<style>
body {background-image:url("images/background.gif");}
</style>

Replace images/background.gif with the actual url to the file you want to use as a background image.

You can look up background-image or background on the W3C school site; http://www.w3schools.com/css/css_howto.asp

 

 Ok i have added this to page_1.html in the template >>

 

<bx_include_auto:_sub_header.html />
<style>
body {background-image:url("bgimage.jpg");}
</style>
    __page_main_code__
<bx_include_auto:_sub_footer.html />

 

cleared all caches but nothing has changed, its still showing the old background on the homepage :/ what am i doing wrong? thanks

You Creature!!
Quote · 23 Mar 2014

The code you posted assumes the image is located in the same directory as the page_1.html file.  Either give the full url or load the image in the same directory.

Geeks, making the world a better place
Quote · 23 Mar 2014

By the way, in template files you can use <bx_url_root />; the template parser will replace that with the site root; remember to not include a / as it includes that.  <bx_url_root />media/images will become http://mysite.com/media/images.

Geeks, making the world a better place
Quote · 23 Mar 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.