- This topic has 24 replies, 8 voices, and was last updated 8 years ago by
BeeLady11.
-
AuthorPosts
-
October 6, 2017 at 4:49 pm #398789
Leo
StaffCustomer SupportShouldn’t the CSS be something like this from the site?
background: #B3FFAB; /* fallback for old browsers */ background: -webkit-linear-gradient(to right, #12FFF7, #B3FFAB); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to right, #12FFF7, #B3FFAB); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */and not using
background-image?October 6, 2017 at 5:40 pm #398794David
StaffCustomer SupportHi Leo, any background you add to the
.generate-content-headeris going to overwrite the header image. I have noticed that the colour overlay and the image is written in the same background image property. Better still i notice that Tom has added the color as a linear gradient, but no option in the header panel to select gradient – so must of been planning ahead.Ha ha if you guys can see the amount of edits on this post you will die laughing. Here’s the final code:
.generate-inside-page-header-content { position: relative; z-index: 0; } .generate-inside-page-header-content:after { content: ""; display: block; width: 100%; height: 100%; position: absolute; top: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0), #B3FFAB); visibility: visible; z-index: -1; }EDIT: I Just found a strange bug. If you add another comma separated RGBA colour to the Header Background image, although it gets rejected back to a transparent background it doesnt. It actually writes in a third gradient colour to what was there before, so you get a three step gradient – which is crazy lol
February 7, 2018 at 10:53 am #490645Dan
Just to add to this discussion, the CSS applied as a color layer on top of the bg image is a linear gradient (with 2 exact values), is there a way in the wp-admin of the page header to set different values to the 2 gradient stops?
I would prefer that to using the pseudo element.See screenshot:
https://www.dropbox.com/s/x4et200lfeprq74/gp-gradient-ui.png?dl=0Thanks
DanFebruary 7, 2018 at 8:01 pm #490968Tom
Lead DeveloperLead DeveloperHi Dan,
Currently there’s no way to do this from within the admin, but I’ll look into it 🙂
February 7, 2018 at 8:10 pm #490972Dan
Thanks Tom!
Much appreciated.Dan
March 19, 2018 at 5:14 am #523569BeeLady11
Hi – I’ve tried putting this css into the child theme’s style.css but it’s had no effect. Any suggestions?
.generate-inside-page-header-content {
position: relative;
z-index: 0;
}
.generate-inside-page-header-content:after {
content: “”;
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0;
background: linear-gradient(to right, rgba(255, 255, 255, 0), #B3FFAB);
visibility: visible;
z-index: -1;
}Thanks very much!
A 🙂March 19, 2018 at 5:18 am #523572BeeLady11
Also tried:
.blog .page-header-content {
background: #03001e; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #fdeff9, #ec38bc, #7303c0, #03001e); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #fdeff9, #ec38bc, #7303c0, #03001e); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */}
(once I’ve got the gradient working, I’ll fiddle around with the colours )
March 19, 2018 at 5:53 am #523588BeeLady11
Found out how to do this. For anyone else struggling with this, I’ve used the following CSS (I used colorzilla to create the gradient very easily and left it as solid in mobile, as it looked a bit funky as a gradient. Filter line commented out as it produces an error and I’m not too fussed about any IE below 10 🙂
@media (min-width:769px) {
.inside-header{
/* Permalink – use to edit and share this gradient: http://colorzilla.com/gradient-editor/#b14995+1,b14995+28,c85ec7+54,ffffff+86 */
background: #b14995; /* Old browsers */
background: -moz-linear-gradient(left, #b14995 1%, #b14995 28%, #c85ec7 54%, #ffffff 86%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, #b14995 1%,#b14995 28%,#c85ec7 54%,#ffffff 86%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, #b14995 1%,#b14995 28%,#c85ec7 54%,#ffffff 86%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#b14995′, endColorstr=’#ffffff’,GradientType=1 ); IE6-9 */
}
} /* End @media */March 19, 2018 at 8:42 am #523770Leo
StaffCustomer SupportGlad you figured out!
March 19, 2018 at 10:47 am #523860BeeLady11
In action: https://essenceofhealing.co.uk/ (site still being built, but I do love Generatepress!)
-
AuthorPosts
- You must be logged in to reply to this topic.