- This topic has 15 replies, 4 voices, and was last updated 1 year, 5 months ago by
Ying.
-
AuthorPosts
-
February 18, 2019 at 8:08 am #813654
Kris
Hi Tom and Team,
See the linked page. The client would like to make the background color of the header a gradient. In the example, you can see that I was able to underlay the gradient using a merged header with a Beaver Builder row. That works for all BB pages but we would rather apply that to the entire site except the front page.
The CSS code is not a problem but what classes or Ids should I target.
Thanks much,
KrisGeneratePress 2.2.2GP Premium 1.7.7February 18, 2019 at 8:17 am #813657epickenyan
Here is an example I borrowed for my site from the design of the Kinsta blog.
.inside-header { background: -webkit-linear-gradient(-30deg,#00004d 0%,#5333ed 49%,#2cd4d9 100%); }
Just an FYI.
February 18, 2019 at 8:19 am #813664Kris
Hey Epic,
Thanks much! I will give that a try.
Kris
February 18, 2019 at 11:53 am #813846David
StaffCustomer SupportThanks Epic π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 18, 2019 at 1:19 pm #813929Kris
Hi Epic and David,
That worked like a charm.
Now how can I exclude the Front Page or a particular page?
Would it be best to use an element in some way?
Thanks much,
KrisFebruary 18, 2019 at 2:03 pm #813959Kris
Actually I should give you more information.
The client wants to merge the front page header with a hero image on the front page and all other pages will have the gradient in the header.
I have a header element setup for this but the .inside-header CSS is overriding that.
Thanks much…
February 18, 2019 at 3:03 pm #813998Kris
I tried excluding the page id class like so but that did not exclude any page…
.inside-header:not(.page-id-9) {
background-image: linear-gradient(-90deg, #a1ce57, #ffffff);
}Cheers
February 18, 2019 at 3:06 pm #814000Leo
StaffCustomer SupportPage id is in the body tag so try this:
body:not(.page-id-9) .inside-header
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 18, 2019 at 3:14 pm #814008Kris
Hi Leo,
Makes perfekt sense… thanks that worked!
Kris
February 18, 2019 at 3:14 pm #814009Leo
StaffCustomer SupportGlad to hear π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2020 at 6:04 pm #1416820Sibi Paul
I tested that Code in GP header… it worked…
But, My Current Settings is “Use Navigation as Header”
So, How Can I Modify it to Show Gradient in Navigation Header?
Kindly Help me…
Thanks.
August 24, 2020 at 8:48 pm #1416892Leo
StaffCustomer SupportAny chance you can open a new topic for your question?
Thanks π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2020 at 8:56 pm #1416899Sibi Paul
My Question is Exactly Related to This Topic…
Gradient Color in Header…
My Header is Navigation Bar.
So, A little modification to the Above code may work…
August 24, 2020 at 8:59 pm #1416902Leo
StaffCustomer SupportTry
.main-navigation
as the CSS selector.If this doesn’t work then please open a new topic.
Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 16, 2021 at 9:58 pm #1965789Ranjeet Singh
please tell how to add header gradient background in My Hindi Blog Amp Pages.
My Blog – Techshole.com
-
AuthorPosts
- You must be logged in to reply to this topic.