Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve a navbar #361

Open
Himanshu-kumar025 opened this issue Oct 12, 2024 · 1 comment
Open

Improve a navbar #361

Himanshu-kumar025 opened this issue Oct 12, 2024 · 1 comment

Comments

@Himanshu-kumar025
Copy link

Himanshu-kumar025 commented Oct 12, 2024

there is a problem in scroll bar and navbar is changing his place when we remove the scroll bar
I can improve that problem . kindly assign me under GSSOC'24 and HACKTOFEST .
THANK YOU
hqqwwertt

@hetvi20
Copy link

hetvi20 commented Oct 12, 2024

@Himanshu-kumar025 you can try this once I provide solution to fix header on top.

body {
/* Always display a scrollbar to prevent layout shift */
overflow-y: scroll;
}

If the issue persists, ensure the navbar has consistent positioning by using position: fixed; or position: sticky; based on the behavior you want.
This will make sure that the navbar stays in place at the top of the viewport and doesn’t shift with changes in scroll behavior. Let me know if you need any further adjustments!

/* Ensure navbar stays fixed at the top */
.navbar {
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants