Advanced Website Creator

Web development tools
It is currently Thu Dec 14, 2017 8:06 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jan 29, 2009 4:10 am 
Hello,

Can you please explain why our web page is going to the left upon loading it up in IE7?

If you visit this link http://www.zen-cart.com/forum/showpost. ... stcount=16 click on eccomerce in the signature you will see what I am talking about it will be left upon loading and if you refresh the window it will be centered.

Make sure your window is fully open or it will look centered, we have tried everything and nothing seems to be working.

We need this not to go left and be centered as it is designed for, due to embarrassment and it is very ugly.

Please advise on how to fix this issue.

Thanks and best regards


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 29, 2009 5:27 am 
Offline
Site Admin

Joined: Thu Jan 04, 2007 1:57 pm
Posts: 303
Hello Host99,
I checked your webpage and the problem is in your custom CSS file in
images/css/main.css

In that file you have a custom rule which fixes the body width. The rule looks like this:

Code:
body {
   ...
   width: 875px;
   ...
}


Once you set the body width to 875px, IE7 will center your content based to that body width. If you don't fix the body width then your content will be centered based on your viewport (browser window) width.

So the correct solution in this case is to remove the property "width: 875px;". Without this property IE7 will center your content correctly.

The only reason why centering worked in other browsers like FF even with that width property, is that these browsers actually ignored this property. while IE7 honored it.

Best regards,
Vesselin[/code]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 29, 2009 8:13 am 
Figures it be something simple and ignorant we were so frustrated we gave up.

But what you said worked and we greatly appreciate it.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 29, 2009 11:45 pm 
OK we just found out it now goes left in firefox so obviously firefox did not ignore that line.

Since it works for IE thats good but now we need it working for Firefox what is the fix for this one so we can get our website back to normal.

it was all well until the latest release so we are not sure what went wrong


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: Fri Jan 30, 2009 9:04 pm 
Offline
Site Admin

Joined: Thu Jan 04, 2007 1:57 pm
Posts: 303
Hello,
I am sorry for the delayed reply. The forum software decided not to email me about your post so I only learned about it after you emailed me.

I took a look at that webpage and adding the following CSS rules fixes the
alignment:

Code:
.index-1 {
        ...
        margin-left: auto;
        margin-right: auto;
}

.index-10 {
        ...
        margin-left: auto;
        margin-right: auto;
}

.index-31 {
        ...
        margin-left: auto;
        margin-right: auto;
}


Basically the above sets the horizontal margins to auto for all 3 topmost DIV elements which centers the content.

However I am curious why Table2CSS did not add these rules. Which version of Table2CSS did you use to convert your page? Did you use version 2.10.1 which is available in the client area?

Best regards,
Vesselin[/code]


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron