IE7 Web Design Issue: Centering
Host your own online meetings for up to 10 people!
Try GoToMeeting FREE for 30 days.
Hold online seminars – with up to 1,000 at once – with GoToWebinar,
the new do-it-yourself Web event service.
Try it free.
I’ve run into two problems that were fine in IE6, in Firefox and Opera, but that display poorly in IE7.
First, the <center> tag.
Yes, it has been deprecated for a while in favor of a <div align=”center”>. And, then, current recommendations call for creating a enclosing <div>and applying margin:auto or margin-right:auto; margin-left:auto.
But, this gets rather hairy very quickly.
With IE6, the easiest way to center a page was to use a <center /> tags. Firefox and Opera went along quietly and all was well, until IE7 came along.
Internet Explorer 7 doesn’t like <center> tags, at least with the combinations of DIVs I was using on my www.TerrysComputerTips.com site.
Although my pages are fixed now (by removing the <center> and </center> tags), IE7 initially took this same beautifully centered page — and right-aligned the DIV at a page width of about 1400 pixels.
Where it got that number, I don’t know. Idenfifying the problem was easy.
Identifying the solution wasn’t — who would have thought that removing the <center> and </center> tags would make the page center properly?
I’m not sure how I found it, other than shooting at the problem with a “what affects the whole page…that I can change” approach. But, that was it.
It’s time to lose the <center> tag.


IE7 Bug: Bulleted Lists at Drawing on the Web on 13 Nov 2006 at 9:48 pm
[...] I wrote the other day about the IE7 Center tag bug. IE6, Firefox 1.5.0.7, Firefox 2.0, and Opera all displayed the pages exactly the same. And, then IE7 came along… [...]