-
AuthorPosts
-
June 25, 2015 at 10:58 pm #464716
Hi,
How can I create a fixed background image on my LayerSlider?
Here’s the page. http://kenblackman.com/new-welcome-page-beta/
The slider in question is in the middle of the page and has only one slide.
Here’s what I’ve tried so far that has NOT worked:
1. In Slider Settings -> Appearance -> Custom slider CSS, add the following:
background-repeat: no-repeat; background-attachment: fixed;
2. Add a Code Block like this:
`#layerslider_6_2 div.ls-inner {
background-repeat: no-repeat;
background-attachment: fixed;
}’2. Give the slide an #ID and add a Code Block like this:
#Ken_text_2 {
background-repeat: no-repeat;
background-attachment: fixed;
}’Thanks for your help.
- This topic was modified 9 years, 6 months ago by mantisjitsu. Reason: typo in the code
June 27, 2015 at 2:29 am #465152Found my own solution. No image set inside the slider at all. Then use a Code Block to set everything on #layerslider_6_2, like this:
#layerslider_6_2 { background: url(https://kenblackman.com/wp-content/uploads/2014/07/chagall_bedroom_cropped.jpg) no-repeat fixed center top; }
That seems to work. Hope doing it this way is compatible and doesn’t break anything in the future!
- This reply was modified 9 years, 6 months ago by mantisjitsu.
June 29, 2015 at 3:52 am #465599Hi!
Great, glad you found a solution. It doesn’t look like it will break anything so you should be safe :)
Regards,
RikardJune 30, 2015 at 6:47 am #466193Hi Rikard, my solution didn’t work on iphone or ipad: the image doesn’t show up at all.
Is there a different object for mobile that I should be attaching my style to?
Or some other solution?
Thanks.
June 30, 2015 at 8:08 am #466201Hi!
The page example is down, and not possible for us to debug it.
Please let us know if you can activate it, so we can check.Regards,
BasilisJune 30, 2015 at 10:11 am #466266Thanks. The page in question is now my home page (http://kenblackman.com).
The LayerSlider in question is near the middle of the page and has text that starts, “For the last 16 years…”
- This reply was modified 9 years, 5 months ago by mantisjitsu.
July 1, 2015 at 12:20 pm #466917Hi!
I tried on my htc device and its showing up fine. Which device are you using? can you check on another device as well please?
Regards,
AndyJuly 2, 2015 at 12:03 am #467285Tried on iPhone 6 and newish iPad 2 mini, both running latest iOS. In both cases the image didn’t show up at all in the LayerSlider, only the text.
July 3, 2015 at 12:28 pm #467944 -
AuthorPosts
- You must be logged in to reply to this topic.