If you don't actually want a specific width, just a border that is the same width as the text, with these additions in
red it worked in ADE 1.7.2, Kobo RMSDK10, and Calibre 2.85:
(Edit: I've added a break in the paragraph to show the difference between this and Sunlite's solution, which is what happens when the paragraph has more than one line: this solution has a border under the whole paragraph, Sunline's has a border under each line.)
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="../Styles/Style0001.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div class="center">
<p class="test">Test test<br/>test</p>
</div>
</body>
</html>
Code:
div.center {
text-align: center;
}
p.test {
display: inline-block;
text-align: center;
border-bottom: 1px solid black;
/*width:10em;*/
}