views:

99

answers:

2

There is a link at the bottom. Pretty much what happens, is when the page gets opened, it loads entirely on the right side of the screen. Then when it finishes loading every single element, it moves to the center which is it's actual position.

I believe the problem is caused by javascript, since the site works perfectly fine without it. It doesn't seem to matter what javascript is included, if I leave just 1 of them, the whole thing comes back.

Could really use the help. Also the site right now is about 500 pages big, so I'm really hoping for a solution which can fix this with just a few steps.

Thanks.

Here is the link to the page so you can get css/code: http://bit.ly/3EyoWu

+2  A: 

Its definitely javascript. I think the banners on your site are loaded at the very end, which leaves the browser making incorrect guesses about the dimensions of the content until the page is loaded.

Try enclosing your javascript code inside fixed width (and height) divs or tables. You can easily determine the width (and height) required by javascript generated code by inspecting your page after its loaded. If its the banners, they are almost always predefined size.

Edit 1 ----

I got it. The specified cell widths for your table are narrower, the browser therefore is unable to calculate the page layout until the page is rendered completely. A column with width 110px has a banner having width = 120px.

Edit 2 ----

Try specifying widths for all-but-one column. That is, if you have three columns in the suspect table, specify the width for two, and let the browser decide the width for the third. Furthermore, the banners seem to occupy a width of 125px instead of 120px, probably because of unnecessary white space around them. I suggest that you revise the column widths appropriately (and parent table's width if necessary).

Salman A
added that(I think, I'm pretty amateur at this), and it didn't seem to work
i've updated the page, so you can check if I got it wrong
the 110px thing is a problem, but it doesn't seem to be causing this effect of moving the thing to the right
I've edited the post
Salman A
A: 

This might almost qualify as a 'flash of unstyled content' (FOUC) except that the browser doesn't first render a page in an unstyled format.

Instead, you see styled content before the Javascript is able to add the finishing touches.

You might get some further hints by searching for 'flash of unstyled content'.

pavium
no the content is 100% styled, its just that it moves the center shell all the way to the right while it loads, and since it's all the way on the right, the right background image gets displaced to the left.
Yes, I'm sure it is, but I was thinking that the JS contribution to the style was delayed until the JS was executed. But I'm guessing. My answer was really meant to suggest a further line of enquiry. I thought someone else might have seen the same effect and lumped it in with 'flash of unstyled content'. Just a thought... Wow! was I really an hour slower than the other answers?
pavium