July 10, 2008
Wanna play Fix My Code?
LATER THAT DAY: I took Wray Cummings’ advice in the comments below, which worked. So, now all the examples of uncentered HR statements in this post are in fact examples of centered HR statements, which makes the post rather mysterious. Imagine, if you will, then, that all of the little horizontal rules are left-justified. And, thanks, Wray!
I know I’m going to be embarrassed about this, but for months, if not for years, I’ve been unable to bend the simple <hr> element to my will. I can adjust its length, but I can’t get the little !@#$% to center itself.
I’ve tried everything I can think of to make it work:
<hr width=’100pt’ >:
<hr width=’100pt’ align=center />:
<hr width=’100pt’ align=’center’ />:
<hr width=’100pt’ style=’text-align:center’ />:
None of these work in Firefox or Safari. I have not intentionally redefined hr in any of my many CSS style sheets, but wouldn’t the local, inline setting take precedence anyway?
What incredibly obvious, embarrassing thing am I missing? Go ahead, make me look bad. And I’ll thank you for it.