I have a textarea in my html file and I am trying to prevent the text from overlapping with an emoji icon button. I would prefer not to use a z-index
for the emoji as it may cause issues with other elements on the page.
Below is the code snippet:
HTML
<button class="emoji"></button>
<textarea rows="6" cols="60" class="divTxtArea" placeholder="Type a message.."></textarea>
CSS
.divTxtArea
{
resize: none;
font-family: "Open Sans";
font-size: 1em;
color:#8b959a;
border-radius: 5px;
border:1px solid #e1e4e6;
width:580px;
padding:15px 20px;
height:180px;
max-height:180px;
overflow-y:scroll;
outline: none;
resize:none!important;
}
div .emoji
{
position:absolute;
left:80%;
margin-top:10px;
display:inline-block;
}
A visual representation of the issue can be seen here: