I'm new to React jsx, I'm using Tailwind and it's very good. I’m also learning as I go. So, in my navigation, I am able to display the hamburger menu, but I don't like the way they are displayed. I'm trying to make sure the entire page is filled with white, see second image below.
This is what I was able to achieve, but I don't think it looks too clean
What I want to achieve, or something like that, is to fill the entire site with white and show the options
My question now is, with my code; how can I do this? This is my navigation jsx, I would appreciate any help. I'm the only team member and there's no lead developer available to help.
import logo from "./favicon.png"; import { motion } from "framer-motion"; import { useInView } from "react-intersection-observer"; import MenuDropdown from "./MenuDropdown"; import { Link } from "react-router-dom"; import { useState } from "react"; export default function Navigation() { const [ref, inView] = useInView({ triggerOnce: false }); const [isOpen, setIsOpen] = useState(false); const [navVisible, setNaVisible] = useState(false); const megaMenu = document.getElementById("mega-menu"); return (); } Jibu Labs
To fill the entire page with white or another background color, you need an outer div with the height set to 100vh and the width set to 100vw. 100vh sets the height to 100% of the web browser screen viewport height, and 100vw sets the height to 100% of the viewport width.