View Full Version : How to center 10% hr on ADE/PRS505

04-16-2009, 08:11 PM
ADE on PRS 505 (Linux here, dunno if it affects x86 ADE) happily obeys "width" property for hr tag:
hr {width: 10%;}

Except I have a hell of a time trying to center such a shortened horizontal line. Throwing "text-align:center" CSS property into hr itself doesn't work, nor does it work in "p" and/or "div" wrappers around "hr" tag.

I also tried display:block/margin-right:auto/margin-left:auto method (as described here ( in all three (hr, p, div) tags, but no joy.

Everything mentioned happily works on both Firefox and Calibre's EPUB viewer. :(

The <p style="text-align: center">n times "em-dash"</p> "workaround" is ... just ugly.

Is there another way?

04-16-2009, 08:15 PM
Does it work in ADE 1.7.x for Windows? The best thing is to try and find out. That way you may not have to keep loading content on your 505 to find what does work if it also doesn't work with desktop ADE.

04-16-2009, 08:48 PM
ADE, the same behaviour as on PRS505

04-16-2009, 08:55 PM
use a width:100% div that contains a center width:10% span with a border

04-16-2009, 09:57 PM
Is there another way?
<hr style="width:10%; margin-left:45%;"/> does work in ADE 1.7 on PC...

04-16-2009, 11:05 PM
Thanks a lot, netseeker. I just discovered the very same thing following Kovid's advice (div/span technique, BTW, does not work on ADE).

"margin-right:45%" does work both on ADE/PC and ADE/PRS505