en.javascript.info/2-ui/4-forms-controls/2-focus-blur/3-editable-div/source.view/my.css
Ilya Kantor af0ee2a49e up
2017-03-18 14:46:13 +03:00

25 lines
393 B
CSS

.view,
.edit {
height: 150px;
width: 400px;
font-family: arial;
font-size: 14px;
display: block;
}
.view {
/* padding + border = 3px */
padding: 2px;
border: 1px solid black;
}
.edit {
/* replace padding with border (still 3px not to shift the contents) */
border: 3px solid blue;
padding: 0px;
}
.edit:focus {
outline: none;
/* remove focus border in Safari */
}