Background image won't stay fixed

Go down

Solved Background image won't stay fixed

Post by Kumari on August 22nd 2015, 9:09 am

hi, I know I have three separate appearance problems, but I wasn't sure to put them in the same thread or not. If there is a problem, please let me know.

I am using PHPBB2

Anyways, I have made two sites, a tester site and my actual site.
On my tester site you can see that the background image scrolls with the forum. It is fixed where it is supposed to be : www.tester.omgforum.net

But, when i apply the same code to my main forum, the image won't stay fixed, as a result the image doesn't scroll with the forum and thus you can only see the top of the entire image.
My background is placed via CSS coding as I had to optimise the code in order for it to fit my pages. So, the code I am using is below. Can someone help me please?

Code:
body{
background-image: url("http://i59.tinypic.com/2q2mljb.jpg");
  background-size: cover;
background-color: #COLOR;
background-repeat: no-repeat !important;
background-position: 0px 0px !important;
}

My main forum is www.thekumariwolves.ohmylife.net . it is in moderation mode at the moment and I'd prefer not to take it off this mode for the time being, but in order to help my problem I am willing to if need be.


Last edited by Kumari on August 23rd 2015, 12:32 am; edited 1 time in total

Kumari
Forumember

Female Posts : 63
Reputation : 1
Language : English
Location : Australia

http://www.thekumariwolves.ohmylife.net

Back to top Go down

Solved Re: Background image won't stay fixed

Post by Ange Tuteur on August 22nd 2015, 10:25 am

Hi @Kumari,

In your rule you forgot to add the background-attachment property. I added it in for you :
Code:
body{
  background-image: url("http://i59.tinypic.com/2q2mljb.jpg");
  background-size: cover;
  background-color: #000;
  background-repeat: no-repeat !important;
  background-position: 0px 0px !important;
  background-attachment:fixed;
}

However, the reason it was and wasn't fixed was most likely due to the option in the administration panel under pics management. ( background fixed )
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Background image won't stay fixed

Post by Kumari on August 23rd 2015, 12:31 am

Thankyou!! With your help I was able to solve my problem, I initially wanted it to scroll with the forum so instead of "Fixed" in the code you gave me, I put in place "Scroll".

Kumari
Forumember

Female Posts : 63
Reputation : 1
Language : English
Location : Australia

http://www.thekumariwolves.ohmylife.net

Back to top Go down

Solved Re: Background image won't stay fixed

Post by Ange Tuteur on August 23rd 2015, 11:16 am

You're welcome ^^

Topic archived

Have a good day. Smile
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2910
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum