View Single Post
Old 08-15-2010, 08:48 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by charleski View Post
1 Centering horizontal rules
The attribute 'text-align' is not implemented for the hr tag, thus 'text-align: center' has no effect on a horizontal rule.
Workaround: set the left and/or right margin to half the width of the horizontal rule, e.g.:
Code:
hr {
   width: 50%;
   margin-left: 25%
   }
I think this is slightly wrong. You need to set the margin to half the width of space left over by the horizontal rule. Eg, if you want a rule that's 70% of the page width, that leaves 30% remaining, so you'd set the left margin to half of that space, or 15%:

Code:
hr {
   width: 70%;
   margin-left: 15%
   }
HarryT is offline   Reply With Quote