Justin Colyar
Justin Colyar

Reputation: 11

Can't use text input

Why am I unable to click on and type in the text input in the following? And what is the best way to fix this?

<body>
    <div class="centralCollumn">
        <div class="NewsTitle">Forum, Ask Questions or give advice</div>
        <div class="NewsHeadBreak"></div>
        <div class="NewsPara">
            <form class="commentForum">
                Leave a comment or question: <input type="text" name="comment" class="comment" ></input>
            </form>
        </div>
    </div>
</body>

Here's my CSS:

.centralCollumn {
    position: absolute;
    top: 18%;
    left: 10%;
    width: 90%;
    height: 100%;
    text-align: center;
    z-index: -1;
    background-color: #ecf1f3;
}

Upvotes: 0

Views: 114

Answers (2)

WilliamK
WilliamK

Reputation: 1

Your input tag is incorrect. Try removing...

</input>

The correct use of a placeholder is...

<input type="text" name="comment" class="comment" value="$comment" >

Upvotes: 0

Ry-
Ry-

Reputation: 224867

The z-index: -1; puts .centralCollumn behind its parent, making it impossible to interact with anything on it. You can still see it since the parent’s background is transparent, though. Just take that part out.

Upvotes: 5

Related Questions