How to make hamburger menu fit to whole page in react jsx
P粉368878176
P粉368878176 2023-08-31 14:31:09
0
1
426

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 (   Logo 

Jibu Labs

); }

P粉368878176
P粉368878176

reply all (1)
P粉596161915

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.

return ( 
         
         
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!