Tuesday, 21 September 2021

Add html back ground to textaread(brute force)

https://stackoverflow.com/questions/16550717/how-to-add-a-background-text-to-textarea-tags 

<div class="wallpapered">

    <div class="background">Some background text...</div>
    <textarea></textarea>
</div>

with the following CSS:

.wallpapered {
    width: 400px;
    height: 300px;
    position: relative;
    outline: 1px dashed blue;
}
.wallpapered textarea {
    width: inherit;
    height: inherit;
}
.wallpapered .background {
    position: absolute;
    top: 0;
    left: 0;
    color: gray;
}

No comments:

Post a Comment