Currently I have 2 underline that I want to join in the middle of the word
how to move the underline in the middle of the word? when I try it goes down + the word
.err {
border-top: 2px dotted red;
display: inline-block;
position: relative;
top: 5px;
z-index: 2;
}
.err:after {
content: '';
width: 100%;
border-top: 2px dotted red;
position: absolute;
font-size: 16px;
top: 5px;
left: -2px;
display: block;
height: 4px;
}
<div>hola
<div class="err">mundo</div> informatico</div>
The underline should simulate an Error line, but in the middle of the word
I have the underline located above that simulates being an ERROR line, but I want to center it in the middle
.err {
border-top: 2px dotted red;
display: inline-block;
position: relative;
top: -1px;
z-index: 2;
}
.err:after {
content: '';
width: 100%;
border-bottom: 2px dotted red;
position: absolute;
font-size: 16px;
top: -5px;
left: -2px;
display: block;
height: 4px;
}
<div>hola
<div class="err">mundo</div> informatico</div>