Struggling to get the Hover feature on Link from Material-UI to function properly

I've been attempting to hover over Link from Material UI, but unfortunately, it's not working as expected. The CSS styles are not being applied for some unknown reason, and I can't seem to figure out why. Additionally, the Button class is also not functioning properly on buttons. I'm currently using the most recent version of MUI.

import {Link , Button} from '@mui/material';
import {makeStyles} from '@mui/styles';

const useStyle = makeStyles({
    MenuItems : {
        '& li' : {
            display : 'inline',
            marginRight : '2rem',
            '&:hover' : {
                color : '#E0475B'
            }
        }
    },
    Link : {
        '&:hover' : {
            color : '#E0475B'
        }
    },
    Button : {
        backgroundColor : '#E0475B' , 
        color : 'white',
        fontSize : '1.5rem'
    }

})

const HomeMenu = () => {
    const classes = useStyle();
    return ( 
        <div className="Body">
            <AppBar style={{backgroundColor : 'white'}}>
                <Toolbar className = {classes.Toolbar}>
                    <div className={classes.MenuItems}>
                        <ul>
                            <li>
                                <Link href = '/' underline = 'none' style={{color : 'black'}} className={classes.Link} >Home</Link>
                            </li>
                            <li>
                                <Link href = '/' underline = 'none' style={{color : 'black'}} className={classes.Link}>About Us</Link>
                            </li>
                            <li>
                                <Link href = '/' underline = 'none' style={{color : 'black'}} className={classes.Link}>Our Mission</Link>
                            </li>
                            <li>
                                <Link href = '/' underline = 'none' style={{color : 'black'}} className={classes.Link}>Contact Us</Link>
                            </li>
                        </ul>
                    </div>
                    <div className={classes.ButtonItems}>
                        <ul>
                            <li><Button variant='contained' className = {classes.Button}>Sign Up</Button></li>
                            <li><Button variant = 'contained' className = {classes.Button}>Log In</Button></li>
                        </ul>
                    </div>
                </Toolbar>

            </AppBar>
        </div>
     );
}
 
export default HomeMenu;

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Include a CSS file from an external JavaScript file

Is there a way to include an external CSS file in an external JS file? I am trying to reference and load Default.css inside Common.js like the image below shows. Any suggestions are greatly appreciated! BB ...

What could be causing my website to automatically adjust the CSS height on its own?

My code looks like this: <li style = "height: 250px;"> <p>Foo</p></li> Despite my efforts, when I visit the website, the height doesn't seem to change. After inspecting the element in Chrome, I discovered that it's s ...

Converting JavaScript code to React requires excluding jQuery

I have been working on updating my old JavaScript code to make it compatible with React. The main goal is to integrate external data into a 3rd party form. Here is the original JS code: <script charset="utf-8" type="text/javascript" ...

Exploring the intricacies of ReactJs lifecycle functions

After developing a website with ReactJs using the lifecycle method, I came across some articles suggesting that this approach should be avoided for production-level applications. They recommend sticking to functional components, hooks, and other practice ...

Encountering 404 Error in Production with NextJS Dynamic Routes

I'm currently working on a next.js project that includes a dynamic routes page. Rather than fetching projects, I simply import data from a local JSON file. While this setup works well during development, I encounter a 404 error for non-existent pages ...

React isn't showing the image

While working on my React website, I encountered an issue where my local image is not displaying. I am using props to pass properties from Cards.js to CardItem.js and everything displays correctly except for the image. I'm not sure what the problem co ...

The scrolling function of the jQuery UI select menu is not working properly on the Android browser

I am currently developing a mobile application that utilizes the jQuery UI select menu. The functionality works well, but I have encountered an issue with certain drop downs being too long to display properly. While my PC shows scrollable floating divs as ...

Ways to transfer a state from the child component to the app component

I have 2 different components that contain sub-components within them. In one of these components, I'm trying to figure out how to transfer the click event from the sub-component to another component so that it can render an entirely new component for ...

What is the best way to update auto margins after resizing an element with Javascript?

I'm having an issue with a DIV on my webpage that is centered using margin-left and margin-right set to auto. When I try to resize the DIV, it no longer stays centered on the screen. <div id="content" style="margin-left:auto;margin-right:auto;widt ...

Styling on Material UI Button disappears upon refreshing the page

I've been using the useStyles function to style my login page, and everything looks great except for one issue. After refreshing the page, all styles remain intact except for the button element, which loses its styling. Login.js: import { useEffect, ...

Why does Firestore interpret a single document read as multiple document reads when using Next.js 13?

When using Next.js 13 to fetch for 3 docs on my page, Firebase is unexpectedly counting it as 10 document reads. Even when redirecting to a detail page where only a single doc is fetched, Firebase counts it as 4 reads. I have checked my code and confirmed ...

The jQuery bxSlider is failing to function properly in a responsive design

Anyone else experiencing issues with the jQuery bxSlider not functioning properly on a responsive layout? It seems to be working fine on larger screens. $(document).ready(function () { $('.slider1').bxSlider({ pagerCustom: '#bx-pager&apos ...

What is the best way to create a Table with a Scroll feature and a fixed Header using CSS code, ensuring it looks sleek and functional across all devices, including smartphones?

I needed a CSS code for my Asp.Net Core Code that would apply to multiple tables. The desired style should include a fixed table header with a scrollable body, ensuring alignment between rows and columns. Despite trying various alternatives, I couldn' ...

Running code step by step in VSCode debugging

After finding answers and solutions partially related to this specific question, I have now established the following launch configurations for debugging my react-redux + electron application. { "version": "0.2.0", "configurations": [ { "typ ...

Issue with FormControlLabel not properly implementing disableCloseOnSelect in Material UI v5 Autocomplete

I'm currently working on developing a wrapper for the MUI Autocomplete component. If you want to see my progress, feel free to check out my codesandbox link: here To keep things simple for demonstration purposes, I've significantly simplified t ...

Route is not simply a component in this context. When using Routes, all component children must be either a Route or wrapped within

I am currently working on my App.js file and encountering an issue while creating paths. I have wrapped a Route element around my IsUserRedirect, but the error persists. import React, {Fragment} from 'react'; import * as ROUTES from './cons ...

Having trouble accessing information from Firebase Realtime Database within a React Native application

I am currently developing a React Native application that interacts with a Firebase database for reading and writing data. I have configured my Firebase permissions to allow read and write access: { "rules": { ".read": true, ...

Production pages encounter 'get' error when refreshed due to routing issues - Node.js, Express API with webpack and ReactJS frontend

I have set up my webpack configuration to compile my react app, and I am using Node.js as the server with Express middleware. Whenever I try to refresh a route on the production environment, for example /chefs, I receive an error. Below is my server.js s ...

Inconsistency with Mobile Viewport Problem

Apologies for the chaos below, but I've spent quite some time attempting to fix this on my own. It's time to surrender and seek assistance! Here are some screenshots to illustrate the issue: The problem is that sometimes the webpage functions c ...

creating a multi-tiered dropdown menu using both CSS and JavaScript

I am in need of a multi-level (drop down) menu feature, that allows me to make changes to the menu in just one file, without having to navigate through each individual page. I require a three level menu. I have attempted to modify someone else's code ...