homepage Welcome to WebmasterWorld Guest from 54.205.168.88
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Website shifts to left while loading
Being caused by scroll bar
Bluestreak




msg:3758555
 3:42 am on Oct 4, 2008 (gmt 0)

I have a weird rendering issue where my site renders just fine, but right before the load is finished the entire pages shifts to the left a few pixels.

After further observation I noticed the shift was being caused by the scroll bar. For some reason there's a few seconds delay before the scroll bar, which is what causes the shift.

I don't get it. I checked another site using the same template theme I do and the sidebar shows up immediately while it renders.

What would cause such a delay? Is there a way I can nail down why it this is happening, maybe with the help of Firebug?

 

tedster




msg:3758562
 4:00 am on Oct 4, 2008 (gmt 0)

Possibly the content that loads first is too short to trigger the scroll bar.

If this issue is a real problem for some reason, you might work to get the content area to load during the first http request. For instance, you might use CSS for source-ordering, so that the main content is at the top of the source code even though other elements end up displaying above it.

Bluestreak




msg:3758566
 5:11 am on Oct 4, 2008 (gmt 0)

I think it's an advertising code with noticeable latency that loads before the rest of the site does. There seems to be no way to get around this unless I put it in an iFrame, which wont do since its contextual. Oh well, at least I found the culprit. It was the mystery that was driving me nuts.

SuzyUK




msg:3758583
 8:53 am on Oct 4, 2008 (gmt 0)

>> I think it's an advertising code with noticeable latency that loads before the rest of the site does.

could you not put the advertising code (JS?) at the end of your HTML, it's recommended practice to put scripts at the end of source anyway, then as Ted says, use CSS to make it display where in the page you need it.

or make a container div for your ads.. give it the ad banner/boxes width and height or more. The div should render immediately and "place-hold" for, then contain, the ad code once the script finishes without needing to resize.

Bluestreak




msg:3758685
 3:39 pm on Oct 4, 2008 (gmt 0)

Thnkas for the suggestions. I'll give these two a try to see what works best if possible. =)

Bluestreak




msg:3758693
 4:13 pm on Oct 4, 2008 (gmt 0)

Just one thing, is there a tutorial I can read that can tell me how to place the JS at the end of the source while still being able to display it earlier on the page? I see to be having trouble finding one.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved