Thread
:
How do I centre a horizontal rule?
View Single Post
08-08-2010, 10:21 PM
#
3
sherman
Guru
Posts: 867
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
margin-left: 25% works if your horizontal rule has a width of 50%.
An alternate way is to set both margins to an identical value and do not specify a width.
eg: margin-left:30%; margin-right:30% would give a centered <hr> with a width of 40%.
sherman
View Public Profile
Find More Posts by sherman
Track Posts by sherman via RSS