How to make an editable DIV look like a text field with CSS?

Spread the love

To make an editable DIV look like a text field with CSS, we set the box shadow.

For instance, we write

div[contenteditable="true"] {
  box-shadow: inset 0px 1px 4px #666;
}

to set the box-shadow property to a border to make it look like a text area.

Leave a Reply

Your email address will not be published. Required fields are marked *