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 04:45 AM

Re: Internet Explorer centering everything
 
Your problem is different and actually more serious. You have this code AFTER your main <body> code:

<body OnLoad="na_preload_img(false, 'http://www.oneofakindscrapz.com/images/logo/logo2a.jpg', 'http://www.oneofakindscrapz.com/images/logo/logo3a.jpg', 'http://www.oneofakindscrapz.com/images/logo/logo4a.jpg', 'http://www.oneofakindscrapz.com/images/logo/logo5a.jpg', 'http://www.oneofakindscrapz.com/images/logo/logo6a.jpg', 'http://www.oneofakindscrapz.com/images/logo/logo7a.jpg');">
<div align="center">

You can only have one <body> tag, so you need to remove the one from wherever you added it that shows the above code. Also, get rid of that div tag with the center align to fix the centering problem.

Victoria Feemster 09-04-2007 04:51 AM

Re: Internet Explorer centering everything
 
ok now is this edited on the skin1.css? I think that above code is my header? I didn't do this design on my site so I am not really familiar with the code. I Just know that it being centered is annoying me.

balinor 09-04-2007 04:54 AM

Re: Internet Explorer centering everything
 
You should contact your designer to see where that code was placed. You have 101 validation errors on your site, so your designer should be fixing those.

Victoria Feemster 09-04-2007 04:55 AM

Re: Internet Explorer centering everything
 
What is a validation error?

balinor 09-04-2007 04:58 AM

Re: Internet Explorer centering everything
 
It means the code was not written to the current web standards, which will cause display issues in different browsers. You can read more about validation/web standards here:

http://www.w3.org

X-Cart validates by default, so it is the code your designer added that doesn't adhere to the standards.

Victoria Feemster 09-04-2007 05:02 AM

Re: Internet Explorer centering everything
 
Thank you. I will get with her

balinor 09-04-2007 05:04 AM

Re: Internet Explorer centering everything
 
Be prepared for a 'Oh we don't need to do that' response. Many developers don't care about writing W3C compliant sites, which is a mistake in my opinion. The <body> issue definitely needs to be taken care of though.

OpheliaPayne 09-04-2007 05:18 PM

Re: Internet Explorer centering everything
 
Quote:

Originally Posted by balinor
View the source...you have a <center> tag (which is a depreciated tag by the way) just after the body tag, and then you attempted to close it within a table cell, which won't work. Get rid of the center tag and use an inline tag to center the main containing table:

<table class="Container" cellpadding="0" cellspacing="0" width="90%" align="center">


Hello.

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 $ *}
  <center>
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"90%" align="center"}">
<tr><td class="Container">  </center>


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 :) Any ideas on how to fix that?

balinor 09-04-2007 05:28 PM

Re: Internet Explorer centering everything
 
You have the center inside the smarty width tag. Use this:

<table class="Container" cellpadding="0" cellspacing="0" width="90%" align="center">
<tr><td class="Container">

Get rid of those <center> tags! :)

carpeperdiem 09-04-2007 05:48 PM

Re: Internet Explorer centering everything
 
Here's my favorite centering trick:

in your css file, try this:

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

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

is the secret.

better than center!


All times are GMT -8. The time now is 10:58 AM.

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