Setting a rocket theme background to fixed
- Category: Joomla
- Hits: 19091
You can probably find this information of the rocket theme forum but I thought I'd put how I resolved this here.
The issue is basically that you want the background to stay in its position in the browser while the rest of the elements scroll about.
- Go to Extensions -> Template Manager> Edit the CSS for the template
- You should be given an option of css files, select styles.css and click on the Edit button
- Look for these lines:
body.bgstyle1 #main-background {background: url(../images/backgrounds/bgstyle1/bgimage.jpg) 50% 0 no-repeat;}
- where 1 is the number of the style of the template I am setting the background for and I add the "fixed" attribute to this id. This will yield the following:
body.bgstyle1 #main-background {background: url(../images/backgrounds/bgstyle1/bgimage.jpg) 50% 0 no-repeat fixed;}
- Click on the 'Save' button.
- The theme is getting it from a generated php file. Look in the CSS folder of the template.
- You should find a PHP file in this folder with the body.bgstyle# line you need to change as in steps 3 and 4.