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 :)
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!! |
You can override the body tag for the home page on page_1.html of the template. Geeks, making the world a better place |
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!! |
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 />
After <bx_include_auto:_sub_header.html /> place your inline style declaration. <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 |
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 />
After <bx_include_auto:_sub_header.html /> place your inline style declaration. <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 />
cleared all caches but nothing has changed, its still showing the old background on the homepage :/ what am i doing wrong? thanks You Creature!! |
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 |
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 |