Unable to click textbox with negative z-index

前端 未结 2 1085
夕颜
夕颜 2021-01-18 06:49

I have a textbox in the middle of the screen, but when I click on it, no clicks are registered. I think it\'s a CSS Z-Index issue. How do I go about diagnosing and fixing t

2条回答
  •  攒了一身酷
    2021-01-18 07:20

    The issue is with the z-index property of div#container element assigned as -1.

    Set the z-index for the element to some higher value like 1000 etc.

    div#container {
    
        background-color: #E9E9E9;
        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.25);
        clear: left;
        height: 75px;
        margin: 0 auto 13px;
        overflow: auto;
        padding-top: 8px;
        position: relative;
        text-align: center;
        width: 510px;
        z-index: 1000;
    }
    

提交回复
热议问题