- This topic has 11 replies, 2 voices, and was last updated 7 years, 3 months ago by Tom.
-
AuthorPosts
-
January 2, 2017 at 3:00 am #259812Janek
Hi,
Please see this screenshot here https://box.everhelper.me/attachment/707467/d5919ccc-12ab-4053-af8a-c28dccf41bc1/231843-CBS0vs64zm28UVtl/screen.jpegAs you see there is a header with two colors: blue and white. Is there a way to create this kind of responsive header with Generatepress? At the moment i uploaded an image but on smaller screens it is not working as needed and is overlapping the header widget.
Thanks,
J.January 2, 2017 at 10:43 am #259940TomLead DeveloperLead DeveloperMy initial thought is using a background image, positioning it to the left and setting it to no-repeat.
However, if you can link me to that site I can see how they did it and let you know ๐
January 2, 2017 at 11:05 am #259952JanekKind of worked just needs to be tweaked for smaller devices. Original site is here though http://anpsthemes.com/industrial/demo-1/
Semmes that there is something to do with the .logo:before pseudo class or something…
January 2, 2017 at 11:27 am #259961TomLead DeveloperLead DeveloperAh, you could try something like that..
.site-logo::before { background-color: #000000; content: ""; height: 100%; position: absolute; right: 100%; top: 0; width: 1200px; }
January 4, 2017 at 5:29 am #260544JanekHi Tom,
Thank you for your reply but it seems that it is not working.What do i have so far from customizer:
Background: default (white)
No background image for header
Header width: full
Inner Header Width: containedJanuary 4, 2017 at 9:25 am #260622TomLead DeveloperLead DeveloperAny chance you can link me to your site with the above CSS added?
January 4, 2017 at 11:45 pm #260814JanekHi Tom,
Yes, sure. Please see here http://bit.ly/2hTHCulJanuary 5, 2017 at 10:13 am #260971TomLead DeveloperLead DeveloperAlright, let’s try this complete CSS:
.site-header { overflow-y: hidden; } .inside-header { position: relative; box-sizing: border-box; } .site-logo::before { background-color: #000000; content: ""; height: 500px; position: absolute; right: 100%; top: 0; width: 1200px; }
January 5, 2017 at 10:31 am #260988JanekHi Tom,
Thank you. This on almost worked… Left from the logo is changed now but the logo background is not yet. Please see the site again, your code is added.
January 5, 2017 at 11:01 am #260997TomLead DeveloperLead DeveloperHere we go:
@media (min-width: 769px) { .site-logo::before { background-color: #3598DB; content: ""; height: 500px; position: absolute; right: calc(100% - 247px); top: 0; width: 1200px; z-index: 1; } .site-logo:after { border-left: 0 solid #3598DB; border-right: 120px solid transparent; border-top: 144px solid #3598DB; content: ""; height: 0; position: absolute; left: 247px; top: 0; width: 0; } img.header-image { position: relative; z-index: 2; } }
January 5, 2017 at 11:06 am #261001JanekExcellent! Just excellent!
Thank you so much, Tom! Can i buy you a beer over Paypal or something?
January 5, 2017 at 11:09 am #261002TomLead DeveloperLead DeveloperYou’re very welcome – thanks for working through it with me ๐
Beer is always appreciated!: https://generatepress.com/ongoing-development
Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.