Background Fixed Image

Post

Posted
Rating:
Item has a rating of 5 (Liked by Master Rat)
#3013 (In Topic #545)
Avatar
Standard member
rgscriven is in the usergroup ‘Fan in action’
I would say this has been asked before about background fixed image.

Back when ocPortal was around i ask a question about the background image to be a fixed type, so like if you open your page and scroll, the image just stays there but everything else moves thats what i want to put back onto my website using composr.

i know its in the global.css but not sure what to change as i also want to have it transparent.

could you please lead me in the right direction in where to find or add this please.

photo is below and you can see where the background dont stay



web.png

Last edit: by rgscriven

Online now: No Back to the top

Post

Posted
Rating:
#3019
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
This CSS property should do it:
CSS background-attachment property


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3023
Avatar
Standard member
rgscriven is in the usergroup ‘Fan in action’
thankyou chris for the reply with the post of this which one am i using on this page and where would i put it as this is abit confusing  and new to me
 

Last edit: by rgscriven

Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris Graham)
#3025
Avatar
Standard member
Paul Flavel (2) is in the usergroup ‘Fan in training’
In your global.css

Here is my entry:

Code

html>body#main_website {
    background: #AEAEAE;
    background-image: url('{$IMG_INLINE;,back3}');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: 50% 0px;
    background-color: #000;
    background-size:2500px;
}

My reference 

Code

$IMG_INLINE;,back3

I uploaded the background image through the "edit theme images" and called it back3, hence the reference.
Adjust the remaining css to suit your needs.

The

Code

background-size:2500px;

Can also be removed, it suits my needs which is why I have it.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Paul Flavel (2))
#3026
Avatar
Standard member
rgscriven is in the usergroup ‘Fan in action’
Thankyou paul
I got the background image static now so its fixed, but with the inner website as it goes up and down with scroll i would like that to be transparent so you can see the whole background image behind the wording.

also i was going though some of your themes and i liked some so i may check them out also.

Last edit: by rgscriven

Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

MVLipwig, babu, amit.nigam, mytracker

Forum statistics:
  • 1,084 topics, 5,240 posts, 6,112 members
  • Our newest member is adasingh
Birthdays:
Back to Top