-
AuthorPosts
-
April 24, 2015 at 1:54 am #257322
Hi Guys,
I am trying to create the following: background image on content band with a transparent color overlay. Like these examples:
I can’t get it to work. Is this possible via CSS?
Or would you recommend doing it via image software like coreldraw/photoshop?Thanks!
April 24, 2015 at 1:54 am #257323This reply has been marked as private.April 24, 2015 at 2:12 am #257327Hello There,
Thanks for writing in!
Yes you can use Photoshop to have your background image with opacity. You can also do by adding your background to the content bands and please add the following css code in the customizer, Appearance > Customize > Custom > CSS
#x-content-band-{1}:before { width: 100%; height: 100%; position: absolute; top: 0; left: 0; background-color: #ff0000; display: block; opacity: 0.125; }
Feel free to change the background color. Always take note of the {ID} number of you content band.
Hope this helps. Kindly let us know.
April 24, 2015 at 8:46 am #257549Great, thanks!
I am going to try this within a few days.
Will keep you guys in the loop.April 24, 2015 at 12:24 pm #257706You’re most welcome.
Let us how it goes.
Thanks. Have a great day! 🙂
April 25, 2015 at 8:46 am #258268Hmm. Not working correctly guys.
I’ve inserted the code in customizer CSS. It does not seem to select the right content band area, in fact in does not seem to select one at all. No matter which content band ID I enter, the colors keep appearing on the same specific areas. Check screenshots (the red areas/stripes):
April 25, 2015 at 8:56 am #258272Hi there,
Please try this code :
.page-id-7 div#x-content-band-1:before { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; background-color: rgba(255,255,255, 0.5); content: ''; display: block; }
Instead of 1 in provided code put your content band id.
Please add background image to content band to see the changes.Thanks.
April 25, 2015 at 9:30 am #258286Again, by changing the content-band number it doesn’t apply to full width content-band, merely a container. On the other hand, if I insert content band 5. It selects the whole page.
April 25, 2015 at 5:59 pm #258458Hello There,
Sorry if it didn’t worked for you! How about we try this code in your customizer, Appearance > Customize > Custom > CSS
.x-content-band { position: relative; } #x-content-band-5:before { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.25); content: ''; display: block; }
Please let us know how it goes.
April 26, 2015 at 3:16 am #258723Yep guys this did the trick!
Thanks again 😀
April 26, 2015 at 3:23 am #258730You’re welcome.
-
AuthorPosts