Best Premium and Free WordPress Themes › Forums › Medical Circle Pro › Shrink header on scroll
Tagged: navbar, sticky header
- This topic has 8 replies, 2 voices, and was last updated 4 years, 4 months ago by
acmesupports.
-
AuthorPosts
-
February 1, 2019 at 12:50 pm #44780
fattyma
ParticipantHello,
I’ve noticed that when navigating the website, the sticky header covers more page space than necessary. I’d like to find a way to shrink it once I scroll down.
Currently I’ve set the image to:#navbar > div > div.navbar-header > a > img{
max-width: 40%;
}But when scrolling down the page, it should get to be 20% max in width. What is the right CSS and JS code to do this?
Thank youFebruary 2, 2019 at 3:09 pm #44850acmesupports
ModeratorDear Fattyma,
Our developer team shall observe your issue and reply you back.Best Regards!
February 4, 2019 at 5:03 am #44964acmesupports
ModeratorDear Fattyma,
Could you please provide us with the URL of your site so that we can observe your issue?
Best Regards!February 4, 2019 at 1:27 pm #45003fattyma
ParticipantHi,
sure: http://www.ferrettinutrizionistacomo.it/Thank you
February 5, 2019 at 5:16 am #45043acmesupports
ModeratorDear Fattyma,
Please add the given CSS code in Additional CSS
Appearance->Customize->Additional CSS#navbar > div > div.navbar-header > a > img { width: 290px; }
Best Regards!
February 5, 2019 at 7:18 am #45054fattyma
ParticipantHello,
this is the code I had already added, as you can see in my first post. 🙂
The problem with it is that it shrinks it permanently. I want it to get smaller when i scroll down the page and back to normal size when I get back to the top of the page.
Just to give you an idea:https://www.w3schools.com/howto/howto_js_shrink_header_scroll.asp but applied to the image and, if possible, the menu font too.
Thank youFebruary 6, 2019 at 4:51 am #45145acmesupports
ModeratorDear Fattyma,
Please add the given CSS code in Additional CSS
Appearance->Customize->Additional CSS.at-sticky#navbar > div > div.navbar-header > a > img { width: 140px; } .at-sticky .main-navigation a { font-size: 14px; } .at-sticky .site-description{ font-size:12px; }
Best Regards!
February 6, 2019 at 8:54 am #45164fattyma
ParticipantWorks like a charm! Thank you
February 7, 2019 at 5:01 am #45270acmesupports
ModeratorDear Fattyma,
You are Most Welcome 🙂
Best Regards! -
AuthorPosts
- You must be logged in to reply to this topic.