SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jun 20, 2008, 14:23 #1
- Join Date
- Jul 2005
- Posts
- 33
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Centering a Horizontal Rule in IE
Hello,
I am trying to center an <hr /> tag in Internet Explorer. Simply setting margin: auto works in every other browser, but not IE. I've also tried align: center, which _should_ work, but it did nothing.
Has anyone else run into this problem?
Thanks,
Michael Boutros
-
Jun 20, 2008, 17:55 #2
- Join Date
- May 2007
- Location
- Newcastle, Australia
- Posts
- 3,718
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Does the page have a complete and valid doctype ? - without that, you won't get anything to centre with auto side margins in IE.
-
Jun 20, 2008, 18:45 #3
- Join Date
- Jul 2005
- Posts
- 33
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Centauri,
The web page is my site, located at http://michaelboutros.com/. As you can see, it does have a valid Doctype declaration, but for some reason it just won't work in IE.
- Michael Boutros
-
Jun 20, 2008, 22:13 #4
- Join Date
- May 2007
- Location
- Newcastle, Australia
- Posts
- 3,718
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Code:.long-divider { margin: 0 auto; display: block; width: 68%; }
-
Jun 20, 2008, 23:12 #5
- Join Date
- Jul 2005
- Posts
- 33
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You sir, are a genius. Thanks so much!
Bookmarks