I found this rather ancient discussion: an unusual form of a text area?
The answer that is given is to use the property contenteditablein div.
I manage to get this code, which seems to be what you are looking for.
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>
#wrapper {
width: 500px;
height: 500px;
}
#logo {
width: 100px;
height: 100px;
float: right;
background-color: cyan;
}
.textarea {
width: 100%;
height: 100%;
}
<html><head><title></title><meta charset="utf-8" /><style>#wrapper {
width: 500px;
height: 500px;
}
#logo {
width: 100px;
height: 100px;
float: right;
background-color: cyan;
}
.textarea {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="logo">LOGO</div>
<div class='textarea' contenteditable='true'>HTML</div>
</div>
</body>
</html>
</style>
</head>
<body>
<div id="wrapper">
<div id="logo">LOGO</div>
<div class='textarea' contenteditable='true'>HTML</div>
</div>
</body>
</html>
Run codeHide resultI just replace <textarea>with <div class='textarea' contenteditable='true'>and position: absolute;with float:right;,
source
share