My app allows users to create different lists, with the ability to edit the name. However, I am facing an issue where if a user types a new name, it should remain on only one line. I tried adding max height and overflow hidden properties, but it only hides the additional lines of text instead of restricting it to one line.
Here is the code snippet:
h3 {
height: 25px;
max-height: 25px;
overflow: hidden;
}
<h3 contenteditable="true">To Do List</h3>
<section id="pageOne" contenteditable="true">
<li style="color: #393939;"></li>
</section>
Attached are some screenshots for reference:
https://i.stack.imgur.com/rwPzz.png https://i.stack.imgur.com/1FrwK.png