Scroll text/content but lock image position

  • 17 January 2014
  • 1 reply
  • 64 views

Hi guys, has anyone built code to lock the position of an image or the background as you scroll up and down a page? Thanks!


1 reply

Userlevel 3

Hi Pierre - Fixing a image and/or background is certainly possible with a little CSS magic.

To fix an image:

Drop in the following script below into your CSS Stylesheets box:

#lp-pom-image-10 <br />
{ <br />
  position:fixed; <br />
  top:30px; <br />
  right:5px; <br />
} <br /> </style>```   
 
This script requires you to specify the fixed position of the image so update the 'top' and 'right' properties as needed.   
 
You'll also want to replace #lp-pom-image-10 with the ID of your image. This can be found by selecting your image and scrolling down to "Advance" on the "Properties" tab.   
 
[http://screencast.com/t/aSab4yI8I](http://screencast.com/t/aSab4yI8I)   
 
**To fix a background:**   
 
First you'll want to set the background image in the "Page Properties" Tab:   
 
[http://screencast.com/t/ddlAVFkP8CT](http://screencast.com/t/ddlAVFkP8CT)   
 
Then add this snipped of CSS into your CSS stylesheets box:   
 
```<style> <br />
#lp-pom-root
<br /> { <br /> background-attachment:fixed; <br /> } <br /> </style>```

Reply