X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Internet Explorer centering everything (https://forum.x-cart.com/showthread.php?t=33512)

balinor 09-04-2007 05:51 PM

Re: Internet Explorer centering everything
 
True, and if you want it even cleaner, use CSS:

.Container (margin: 0 auto;}

OpheliaPayne 09-04-2007 05:53 PM

Re: Internet Explorer centering everything
 
Balinor,

I pasted the wrong code. Sorry about that. Lets try this again.

I changed this...

Code:

{* $Id: rectangle_top.tpl,v 1.25 2006/02/07 08:09:51 max Exp $ *}
  <center>
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"90%"}">
<tr><td class="Container">  </center>


to this:

Code:

{* $Id: rectangle_top.tpl,v 1.25 2006/02/07 08:09:51 max Exp $ *}
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"90%" align="center}">
<tr><td class="Container">


It does fix the issues of the tables being centered, however it creates a new issue where the the store is left aligned now instead of centered in the middle of the page. Since our site is centered in the middle of the page at 90%, we obviously can't have the store left aligned :smile: Any ideas on how to fix that?

carpeperdiem

I will try this with the css :) Thank you.

Victoria Feemster 09-04-2007 06:39 PM

Re: Internet Explorer centering everything
 
OpheliaPayne,

On your site, I see the text in the sideboxes as centered but your logo as right aligned on IE.

somekindahate 09-04-2007 07:25 PM

Re: Internet Explorer centering everything
 
OphelliaPayne,

Your solution of removing the <center> tag and using align="center" is not correct. And like others have stated, you should be using CSS to fix this problem, not deprecated HTML. Remove the align attribute and the center tags you've added.

Go to skin1/customer/main/home.tpl

After the <body> tag add <div id="envelope">
Before the closing </body> tag add </div>

Add the following to your CSS file skin1.css
Code:

body {
  text-align: center;
}
#envelope {
  text-align: left;
  margin: 0 auto;
}


When you view the source, there should be a <div id="envelope"> ... </div> wrapping the contents of the page just inside of the body tag.

OpheliaPayne 09-04-2007 08:17 PM

Re: Internet Explorer centering everything
 
Quote:

Originally Posted by somekindahate
OphelliaPayne,

Your solution of removing the <center> tag and using align="center" is not correct. And like others have stated, you should be using CSS to fix this problem, not deprecated HTML. Remove the align attribute and the center tags you've added.

Go to skin1/customer/main/home.tpl

After the <body> tag add <div id="envelope">
Before the closing </body> tag add </div>

Add the following to your CSS file skin1.css
Code:

body {
  text-align: center;
}
#envelope {
  text-align: left;
  margin: 0 auto;
}


When you view the source, there should be a <div id="envelope"> ... </div> wrapping the contents of the page just inside of the body tag.


This did not work.

Quote:

TABLE.Container { width: 900px; margin-left: auto; margin-right: auto; background-color: #FFFFFF; }

margin-left: auto;
margin-right: auto;

This did work. Thank you. :)


All times are GMT -8. The time now is 12:47 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.