I have the following:
#container {
background-color: #ddd;
width:150px;
height: 150px;
display: grid;
vertical-align: middle; text-align: center;
align-items: center;
}
#container:focus {
align-items: center;
vertical-align: middle;
text-align: center;
}
<div id='container' contenteditable="true">
</div>
I'd like to have the cursor initialise in the center of the div container. At present, it starts at the top (Chrome) or bottom (Firefox). It centralises as soon as I start typing.
How do I initialise the vertical alignment of contenteditable div cursor with css?