Re: [WSG] Main Content won't Center Align in IE
IE Doesnt understand margin: auto IE6 does, as does IE5/Mac. Only if you are worried about IE5.*/Win do you need the text-align hack. /Roger -- http://www.456bereastreet.com/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Main Content won't Center Align in IE
Hey Mario, IE Doesnt understand margin: auto You need to give the parent container text-align: center - then in the child (#container) have: text-align: left to fix the centered text. Simply add this to your body {} CSS: text-align: center; Because you already have: text-align: justify - there wont be any other problems :) aww and since your table is centered, that causes no problems either! :) Cheers [EMAIL PROTECTED] wrote: G'day Mates, I've persuaded a client to convert their small web site to standards, and I'm in the process of removing tables, and using CSS to control the layout and design. My problem is the main content area on the homepage is left justified in IE, but center aligned in FF and Opera, which is correct. The following is a snippet from my CSS file, which controls the main content area: #container {position: relative; width: 760px; margin: 15px auto; font: 12px verdana, helvetica, arial, sans-serif; text-align: justify; line-height: 16pt; color: #000; padding: 10px;} I want it to center align in IE too therefore what am I doing wrong? Here's the URL for the test file: http://www.waltermortgage.com/index1.stm Any advice is always appreciated! Respectfully requested, Mario S. Cisneros ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- Chris Stratford [EMAIL PROTECTED] http://www.neester.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Main Content won't Center Align in IE
Hi, I think your question is a kind of FAQ, and the solution is adding text-align:center; style to the body element, I guess. On Apr 1, 2005 3:58 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: My problem is the main content area on the homepage is left justified in IE, but center aligned in FF and Opera, which is correct. The following is a snippet from my CSS file, which controls the main content area: #container {position: relative; width: 760px; margin: 15px auto; font: 12px verdana, helvetica, arial, sans-serif; text-align: justify; line-height: 16pt; color: #000; padding: 10px;} I want it to center align in IE too therefore what am I doing wrong? Here's the URL for the test file: http://www.waltermortgage.com/index1.stm -- Kazuhito Kidachi mailto:[EMAIL PROTECTED] ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Main Content won't Center Align in IE
On Fri, 1 Apr 2005 00:58:55 -0600 (CST), [EMAIL PROTECTED] wrote: [...] I want it to center align in IE too therefore what am I doing wrong? Here's the URL for the test file: http://www.waltermortgage.com/index1.stm Any advice is always appreciated! Add text-align: center to the body declaration. body { background: #fff; margin: 0; padding: 0; text-align: center; } (you may also want to run the HTML file through Tidy Online http://infohound.net/tidy/ to check and clean it). Respectfully requested, Mario S. Cisneros Best, David -- de gustibus non est disputandum http://www.dlaakso.com/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Main Content won't Center Align in IE
Chris, I feel stupid! I completely forgot IE doesn't recognize margin: auto, and I've inserted text-align: center in the CSS body rule in another design. Please forgive my temporary memory freeze :) Again, I've just gotten started on the conversion, and do plan on removing all table tags. Thanks very much for the quick response, and my apologies for the post, but sometimes it's the simple rules you forget. Warm regards, Mario Hey Mario, IE Doesnt understand margin: auto You need to give the parent container text-align: center - then in the child (#container) have: text-align: left to fix the centered text. Simply add this to your body {} CSS: text-align: center; Because you already have: text-align: justify - there wont be any other problems :) aww and since your table is centered, that causes no problems either! :) Cheers [EMAIL PROTECTED] wrote: G'day Mates, I've persuaded a client to convert their small web site to standards, and I'm in the process of removing tables, and using CSS to control the layout and design. My problem is the main content area on the homepage is left justified in IE, but center aligned in FF and Opera, which is correct. The following is a snippet from my CSS file, which controls the main content area: #container {position: relative; width: 760px; margin: 15px auto; font: 12px verdana, helvetica, arial, sans-serif; text-align: justify; line-height: 16pt; color: #000; padding: 10px;} I want it to center align in IE too therefore what am I doing wrong? Here's the URL for the test file: http://www.waltermortgage.com/index1.stm Any advice is always appreciated! Respectfully requested, Mario S. Cisneros ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- Chris Stratford [EMAIL PROTECTED] http://www.neester.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Main Content won't Center Align in IE
On Apr 1, 2005 3:58 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: My problem is the main content area on the homepage is left justified in IE, but center aligned in FF and Opera, which is correct. The following is a snippet from my CSS file, which controls the main content area: #container {position: relative; width: 760px; margin: 15px auto; font: 12px verdana, helvetica, arial, sans-serif; text-align: justify; line-height: 16pt; color: #000; padding: 10px;} body { text-align: center; } #container { margin: 15px auto; text-align: justify; /* or text-align left */ } margin: auto does'nt work in IE. -- Mvh/Regards Lennart Fylling http://lennart-fylling.com web design consultancy ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 30.03.2005 ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **