View Single Post
Old 08-15-2010, 09: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: 64,865
Karma: 42808855
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
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 online now   Reply With Quote