I tried the following and it does what you want in a browser.
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>
<style>
p.test {
text-align: center;
}
span.test {
padding: 0 1px;
border-bottom: 1px solid black;
}
</style>
</head>
<body>
<p class="test"><span class="test">Test test test</span></p>
</body>
</html>
The Pros can probably tell you in which ebook it will break.