View Single Post
Old 08-02-2019, 03:53 PM   #12
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Vroni View Post
As soon as i add the width to the style the text is no longer centered. Without it, the border sticks out to far,

I tried with divs but wanst succesful. Any idea? And of course i need this worklng in ADE and RMSDK

Vroni
With these additions in red it worked in ADE 1.7.2, Kobo RMSDK10, and Calibre 2.85:
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 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;
}
GeoffR is offline   Reply With Quote