user1681732
user1681732

Reputation: 97

Button click event not happening

Ive got a bunch of menu button's I've recently styled with CSS

<button type="button" class="menu">Menu Button</button>

CSS:

button.menu {
    font-family: 'Calibri', sans-serif;
    font-weight: bold;
    font-size: 12px;
    border: none;
    color: #1a3e66;
    text-align: right;
    padding-right: 45px;
    padding-bottom: 6px;
    height: 34px;
    width: 134px;
}

button.menu:hover {
    padding-right: 49px;
    padding-bottom: 10px;
    cursor: pointer;
}

button.menu:active {
    padding-right: 45px;
    padding-bottom: 6px;
}

If you click where the padding changes no click event fires. Is there any way to move the text around within the button or fix this behavior?

EDIT: Updated and removed extraneous information.

Upvotes: 0

Views: 96

Answers (1)

user2195741
user2195741

Reputation:

:active selector its not a click event.

active in css mean when you just click something happends whenever is the click still active. What you need is click event.

Upvotes: 1

Related Questions