- This topic has 83 replies, 16 voices, and was last updated 6 years, 2 months ago by Leo.
-
AuthorPosts
-
October 2, 2014 at 11:12 am #36317TomLead DeveloperLead Developer
Hi Simon,
Your site looks great!
Are you wanting a space to always be present below the header, even when scrolling down?
If so, I don’t think that’s do-able. Right now, your header is fixed to the top, and all of the below content will move behind it – regardless of spacing.
While it may be possible, it would involve some funky HTML/CSS hacking, and probably isn’t worth it.
Let me know if that makes any sense π
November 27, 2014 at 3:33 am #49446Simon ReedHi Tom
So, so sorry not to have thanked you for your reply. I’ve only just seen it and never got an email notification (that I just assumed – wrongly obviously – I would get), or at least I don’t remember seeing one.
Thanks anyway for coming back to me, I appreciate it and what you say makes sense. Thanks also for the nice comment about my site. I appreciate that too!!
Simon
November 27, 2014 at 2:35 pm #49571TomLead DeveloperLead DeveloperHi Simon,
No worries! π
January 10, 2015 at 11:40 am #63926theonetruevladThat’s great, however, how can I get my ‘back to top’ anchor to work?
If I ID the first line of the content it sits behind the fixed header, which technically accurate, putting the content at the top of the page.
I tried sticking the id in the before header hook but again, still hides the top of the content behind the top of the heading.For Simon’s header content separator request, could you not cheat and add a border/padding or something under the menu that is the same size and colour as the original separation? Surely that is straight forward code?
January 11, 2015 at 10:22 am #64282AlexeyHi!
I’m using GP Hooks and plugin Simple Custom CSS
Gould you check my website? It’s not working.
http://www.vipdeposits.ruI add <div class=”custom-fixed-header”> to the Before Header
add </div> in After Headeradd to Simple Custom CSS
.custom-fixed-header {
position: fixed;
top: 0;
width: 100%;
z-index: 2000;
}.container {
padding-top: 120px;
}January 11, 2015 at 10:30 am #64283Alexeyworks OK in Chrome, not in Internet Explorer
January 11, 2015 at 10:35 am #64284Alexeyand one more quastion π
How to fix only menu not a Header?BWT i checked these in Safari – not working too
January 11, 2015 at 11:06 am #64286TomLead DeveloperLead DeveloperHi there,
This thread should help: http://generatepress.com/forums/topic/keep-menus-visable-with-scroll/#post-54453
It should work in all browsers except for old versions of IE.
March 5, 2015 at 12:13 pm #83072Szilard VenczelHi Tom,
First of all I’m very satisfied with the GP theme it’s very easy to customize for the different needs. I usually also find solution to my problems in the forum.
I managed to make the header fix based on the description above using simple custom CSS. My only problem is that it looks a bit weird on smartphone size displays. Is there a way to set the header fixed only for certain resolutions or so?
Thank You!
regards,
Szilu
March 5, 2015 at 11:08 pm #83210TomLead DeveloperLead DeveloperAbsolutely, placing the CSS inside the below will make sure it’s only read on larger screens – mobile or small browsers will ignore the CSS:
@media screen and (min-width: 769px) { /* CSS in here is ignored on mobile */ }
March 5, 2015 at 11:46 pm #83219Szilard VenczelThank You! IT works as it should.
regards,
Szilu
March 5, 2015 at 11:46 pm #83220TomLead DeveloperLead DeveloperGlad I could help π
March 6, 2015 at 2:23 am #83259Szilard VenczelTom,
One more thing regarding header setup. I figured, that when I settop:0;
The admin bar covers the top of the header. Is there a way to trigger a different class for logged on user only? I tried to add.logged-in .custom-fixed-header{...}
but it didn’t work.March 6, 2015 at 12:48 pm #83502TomLead DeveloperLead DeveloperActually, WordPress adds a class to the
<body>
element when the admin bar is present, so you can do this:.admin-bar .custom-fixed-header {...}
Hope this helps π
March 7, 2015 at 5:41 am #83665Dee BroughtonSimon –
If I understand you correctly, I add a border-bottom to the header to give it that look on my mobile menus. I believe theonetruevlad was making the same suggestion. -
AuthorPosts
- You must be logged in to reply to this topic.