<div id="box">
<span class="cbox1">xg</span>
<span class="cbox2">xg</span>
<span class="line"></span>
</div>
div {
display:inline-block;
width: 100px;
height: 100px;
border: 1px solid #f00;
}
span {
width: 40px;
border: 1px solid #000;
display:inline-block;
}
.cbox1 {
font-size: 20px;
height: 30px;
}
.cbox2 {
font-size: 12px;
height: 20px;
}
.line {
display: block;
position: absolute;
top: 31px;
height: 1px;
width: 100%;
border: 0;
background: green;
}