Tagged: x
-
AuthorPosts
-
May 10, 2016 at 5:59 am #983866
DadparvarParticipantHi,
I added a background image for a layout in my site. Then in custom css of it, I added this:
background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) );
To darken it. But it doesn’t work. When I add this code, the image goes away and all the background becomes black.Regards
May 10, 2016 at 6:00 am #983867
DadparvarParticipantI also tested this and not worked too:
background-image: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) );May 10, 2016 at 8:36 am #984086
Paul RModeratorHi,
You can try this code instead
body { background: #000; background-image: url("IMAGE_URL"); /* fallback */ background-image: url("IMAGE_URL"), linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ); /* W3C */ }Hope that helps.
May 10, 2016 at 10:14 am #984246
DadparvarParticipantNot worked. I just appropriate code for that layout’s background, but it keeps it lighten as it is and no darken effect appears.
Even I deleted the background image chosen from the layout’s manager section, and added this codes for it, and it added the background, but not dark mode. The normal mode of it.May 10, 2016 at 1:13 pm #984525
RupokMemberHi there,
Would you share your URL and the code you are using (after updating with image link).
Thanks
May 10, 2016 at 2:07 pm #984620
DadparvarParticipantThis reply has been marked as private.May 10, 2016 at 2:09 pm #984623
DadparvarParticipantThis reply has been marked as private.May 11, 2016 at 12:18 am #985341
LelyModeratorHello There,
Thank you for the screenshot. Please add the following instead on Settings Tab > Custom CSS:
div#x-section-7 { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('http://dadparvar.ir/wp-content/uploads/2016/05/1500-750.png') !important; background-position: 50% 50% !important; height: auto; background-size: cover !important; }Hope this helps.
May 12, 2016 at 5:01 am #987537
DadparvarParticipantThanks.
This just worked.
May 12, 2016 at 5:55 am #987604
ChristianModeratorYou’re welcome. Glad we could help. 🙂
June 6, 2016 at 3:57 am #1027632
DadparvarParticipantJust a new question here.
I don’t know why when I use this code to darken the bg image, then the parallax for that bg will not work anymore.
Any opinion will be appreciated.
June 6, 2016 at 6:06 am #1027795
ChristopherModeratorHi there,
Please update your code to :
div#x-section-7 { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('http://dadparvar.ir/wp-content/uploads/2016/05/1500-750.png') !important; height: auto; background-size: cover !important; }Hope it helps.
June 6, 2016 at 6:11 am #1027799
DadparvarParticipantThanks
Did it, but not worked. Still the bg image looks fixed and parallax is not set on it.
June 6, 2016 at 8:00 am #1027934
ChristopherModeratorHi there,
Please enable parallax.
Update your CSS to :
div#x-section-9:before { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)); content: ""; position: absolute; display: block; width: 100%; height: 100%; left: 0; right: 0; bottom: 0; top: 0; }Add this code as well :
#x-section-9{ position:relative; }Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-983866 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
