Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Internet Explorer centering everything

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 09-04-2007, 04:45 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #12  
Old 09-04-2007, 04:51 AM
 
Victoria Feemster Victoria Feemster is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 45
 

Default 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.
__________________
Thank you,
Victoria Feemster
x-cart pro - 4.1.8
Reply With Quote
  #13  
Old 09-04-2007, 04:54 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #14  
Old 09-04-2007, 04:55 AM
 
Victoria Feemster Victoria Feemster is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 45
 

Default Re: Internet Explorer centering everything

What is a validation error?
__________________
Thank you,
Victoria Feemster
x-cart pro - 4.1.8
Reply With Quote
  #15  
Old 09-04-2007, 04:58 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #16  
Old 09-04-2007, 05:02 AM
 
Victoria Feemster Victoria Feemster is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 45
 

Default Re: Internet Explorer centering everything

Thank you. I will get with her
__________________
Thank you,
Victoria Feemster
x-cart pro - 4.1.8
Reply With Quote
  #17  
Old 09-04-2007, 05:04 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #18  
Old 09-04-2007, 05:18 PM
 
OpheliaPayne OpheliaPayne is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 130
 

Default 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?
__________________
xCart 4.6.1
Reply With Quote
  #19  
Old 09-04-2007, 05:28 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #20  
Old 09-04-2007, 05:48 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020