Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,059 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,560 people online right now. Registration is fast and FREE... Join Now!




How to specify load order of Divs?

 
Reply to this topicStart new topic

How to specify load order of Divs?

CarpeD1em500
31 Jul, 2008 - 06:34 AM
Post #1

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 7

Hey guys,

On my site I have everything broken down into div containers. There is a menu, nav bar, main site content, etc. etc.

Everything usually loads great, as I kept my design to a lot of text and all CSS, so there is no stress on my server. However, for my "poll of the day", I use a company's code that reaches out to their servers. The problem is that their servers are sometimes very slow and busy, and this causes that specific DIV of my code to completely stop the rest of the page from loading. It takes 10-15 seconds, and either appears, or I guess it "times out", skips the poll, and loads the rest of the site.


My question is this...

Is it possible to specify a "load order" for divs? That way I could tell the page to load everything on my server first, and that specific DIV last...so it doesnt slow down my site at all. If the user is still on the homepage by the time the poll loads, great, if not, then its really not a big deal.

Any advice? Is there a script for this? Is it like a CSS setting?

Thanks in advance!

ps the current link I'm talking about is at http://www.latehitz.com/homecsstesta.html The MicroPoll is on the right side bar, below the "Hitz Cast" image.
User is offlineProfile CardPM
+Quote Post

didgy58
RE: How To Specify Load Order Of Divs?
31 Jul, 2008 - 08:12 AM
Post #2

D.I.C Head
**

Joined: 23 Oct, 2007
Posts: 170



Thanked: 1 times
My Contributions
couldnt you just place the div as the last thing on the html page and then position it with css, to put it in the position you want it? i think this might help with that load time, as it would be the last thing to appear on the page? im not sure if this is how you would go about it.
User is offlineProfile CardPM
+Quote Post

CarpeD1em500
RE: How To Specify Load Order Of Divs?
31 Jul, 2008 - 08:14 AM
Post #3

New D.I.C Head
*

Joined: 12 Jul, 2008
Posts: 7

QUOTE(didgy58 @ 31 Jul, 2008 - 09:12 AM) *

couldnt you just place the div as the last thing on the html page and then position it with css, to put it in the position you want it? i think this might help with that load time, as it would be the last thing to appear on the page? im not sure if this is how you would go about it.




hmm - I mean yeah that could work, I can't say I would know how to do this though...

I figured there was some javascript or something else for like an "onload, display" type function.

Any other ideas? Or any specific code to align a div exactly where I want it, but also (since my site is centered), stretchable and positionable based on their resolution?
User is offlineProfile CardPM
+Quote Post

Mommy
RE: How To Specify Load Order Of Divs?
9 Aug, 2008 - 02:21 PM
Post #4

D.I.C Head
Group Icon

Joined: 4 Aug, 2008
Posts: 104



Thanked: 2 times
My Contributions
The idea that didgy came up with would work. If I were you I'd just get a free script and put it on your site.. try hotscripts.net
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 06:12PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month