diff --git a/src/components/NavBar/NavBar.css b/src/components/NavBar/NavBar.css index d04e5f6..d45dbfb 100644 --- a/src/components/NavBar/NavBar.css +++ b/src/components/NavBar/NavBar.css @@ -29,4 +29,12 @@ a:hover{ .blue:hover{ color : lightblue; +} +.nav-scroll{ + float:right; + +} +#navbarSupportedContent{ + width: max-content; + margin-left: auto; } \ No newline at end of file diff --git a/src/components/NavBar/index.js b/src/components/NavBar/index.js index a7ce15c..d59a41f 100644 --- a/src/components/NavBar/index.js +++ b/src/components/NavBar/index.js @@ -1,4 +1,4 @@ -import React, { useRef } from "react"; +import React, { useRef,useState } from "react"; import { Image, Navbar, Container, Nav } from "react-bootstrap"; import "./NavBar.css"; import logo from "../../newlogo.png"; @@ -15,6 +15,7 @@ const NavBar = () => { behavior: 'smooth' }); } + const [expanded, setExpanded] = useState(false); return ( @@ -30,7 +31,7 @@ const NavBar = () => { - + @@ -42,50 +43,51 @@ const NavBar = () => { setExpanded(expanded ? false : "expanded")} lable="Toggle navigation" aria-controls="navbarSupportedContent"> -