Skip to content

Commit 87c74e0

Browse files
author
Muchael123
committed
Add header fix
1 parent 7b0e4f3 commit 87c74e0

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/components/HeroHeader/DesktopHero.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import Navbar from '../Navbar';
32
import LinkButton from '../LinkButton/LinkButton';
43

54
export default function HeroHeader() {
@@ -12,9 +11,7 @@ export default function HeroHeader() {
1211

1312
}}
1413
>
15-
<div className="relative">
16-
<Navbar />
17-
</div>
14+
1815
<div className="w-full flex flex-col items-center justify-center z-10 bg-black bg-opacity-30">
1916
<h1 className="font-montserrat font-bold text-center text-white text-[40px] leading-10 w-[388px] mx-auto mt-24">
2017
React Developer Community Kenya

src/components/HeroHeader/HeroHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function HeroHeader() {
2020
if (!screenWidth) return null;
2121

2222
return (
23-
<div id="hero" className="pt-2 bg-[#060b17]">
23+
<div id="hero" className="pt-2 bg-[#060b17]">
2424
{screenWidth < breakpoint ? <MobileHero /> : <DesktopHero />}
2525
</div>
2626
);

src/components/Navbar/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import LinkButton from '../LinkButton/LinkButton';
88
export default function Navbar() {
99
return (
1010
<>
11-
<header className="lg:pl-[49px] w-full fixed top-0 bg-black bg-opacity-50 z-10">
11+
<header className="lg:pl-[49px] w-full bg-black bg-opacity-50 z-10">
1212
<nav className="nav py-4 pl-5 flex flex-col md:flex-row justify-around items-center">
1313
<div>
1414
<Link href={HOME}>

src/pages/index.page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ContactUs from '../components/ContactUs';
44
import Events from '../components/Events/Events';
55
import MissionPillars from '../components/MissionPillars/MissionPillars';
66
import HeroHeader from '../components/HeroHeader';
7+
import Navbar from '../components/Navbar';
78

89
export default function Home() {
910
return (
@@ -22,6 +23,9 @@ export default function Home() {
2223
/>
2324
</Head>
2425
<main className="">
26+
<div className="fixed w-[100%] top-0 z-50">
27+
<Navbar />
28+
</div>
2529
<HeroHeader />
2630
<div className="flex flex-col py-12 bg-[#030e30] text-white">
2731
<AboutUs />

0 commit comments

Comments
 (0)