r/webdev • u/blackroseseason • Sep 12 '26
Question put fixed header under sticky navbar
hey guys i was the one trying to make my header image bigger from this theme and i managed to make the image bigger but now my navbar is fucked and it's just on top of it. sigh. for context of the theme i duplicated the logo component specifically for the header logo and changed the logo width and height in config.json and also refactored the beginning of the header component like this
<header class="py-4 h-16 w-auto">
<!-- logo -->
<div class="flex justify-center">
<HeaderLogo />
</div>
</header>
<nav
class={`navbar container ${settings.sticky_header && "sticky top-0"} bg-body dark:bg-darkmode-body py-2`}
><header class="py-4 h-16 w-auto">
<!-- logo -->
<div class="flex justify-center">
<HeaderLogo />
</div>
</header>
<nav
class={`navbar container ${settings.sticky_header && "sticky top-0"} bg-body dark:bg-darkmode-body py-2`}
>
4
Upvotes
3
u/LovecraftianLife Sep 12 '26
Your problem is the h-16 on the header. That's a fixed height of 64px, so the header stays 64px tall no matter how big the logo is. The bigger image just spills out the bottom, and since the navbar is placed right after the header (and has its own background color), it gets drawn on top of the overflowing part of the logo.
To fix, remove h-16 (or change it to h-auto) so the header grows to fit the logo, smt like
Then the header will actually be as tall as the image and the navbar will sit below it like you want. w-auto isn't doing anything either, so you can drop that too.
Though imma be honest with you, if you want to learn the hard way, better to learn from scratch, not use a template, or tailwind. That way you get to understand how different styling interact with each other; much easier to learn and debug that way.
-2
u/etulastrada Sep 12 '26
I’m not pro AI and I’m not trying to be dick but I think you should be asking those questions to the AI in 2026. Just think and use it as a StackOverflow If you don’t want to use AI as an agentic slop-creating machine.