05-17-2012 03:03 PM
Is it possible to center a horizontal line?
It should be centered by default, but I can't seem to get it to center.
<div style="text-align:center;"><hr style="display:inline-block; width=30%;" align="center" /></div>
any tricks to get this <hr> to center?
05-19-2012 01:48 AM
Every e-reader has certain ways of doing things different like margins and centering. I just played around with different ways of formatting the hr and I found that while I could style it to center in a mobi file at 30%, it would left align after converting to epub when I opened it in Adobe Digital Editions. Now if I took out the 30% and just left the line at the full 100%, it would center just fine.
I also found that in the mobi file the old fashioned html way of doing it:
worked better than with a style:
<hr style="width: 30%" />
05-19-2012 03:25 AM
Somebody just gave me an idea. Instead of setting the percentage of the rule, set left and right margins of the div until you get the rule down to the size you want.