G
G
gingerose2021-11-04 00:10:31
css
gingerose, 2021-11-04 00:10:31

Why might hover not work?

There are three buttons that should change the style on hover, but for some reason the hover pseudo-class doesn't work. What could be the reason?

<div className="menu">
            <button className="login">log1</button>
            <button className="login">log2</button>
            <button className="login">log3</button>
          </div>

.menu
{
    margin-top: 70px;
    margin-left: 17%;
}
.login
{
    font-family: 'Times New Roman', Times, serif;
    font-size: 30px;
    color: white;
    border: none; 
    outline: none; 
    width: 250px;
    height: 300px;
    margin-left: 100px;
    background-color: rgba(48, 98, 207, 0.795);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.login:hover
{
    font-style: oblique;
    cursor: pointer;
    background-color: rgba(51, 157, 243, 0.795);
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Liuonid, 2021-11-04
@gingerose

all code is not visible. But I think pointer-events: none will help you; - poke this property to parents.

I
Ilya, 2021-11-04
@Rimush

Not classname, just class

N
Nikolay Matyushkin, 2021-11-04
@Devilz_1

Everything is working

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question