Header height when scrolling down

Hi,
I managed to reduce the header height and logo size by using this CSS in my child theme :

.site-logo {
	max-height: 70px;
}
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	background-color: transparent;
	padding: 10px 0;
	-webkit-transition: all 0.3s ease-out;
	   -moz-transition: all 0.3s ease-out;
	    -ms-transition: all 0.3s ease-out;
	     -o-transition: all 0.3s ease-out;
	        transition: all 0.3s ease-out;
}

But when I scroll down the page, the header gets bigger back to its default size. I couldn’t find how to fix that.

Thanks for your help.

Forgot the site address sorry

Hello there,

Please add the following CSS code:


.site-header.float-header {
   padding: 5px 0 !important;
}

Regards,
Kharis

1 Like

Perfect thank you very much !

You’re welcome and best wishes!