Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macaddict23

macrumors 6502
Original poster
Jun 20, 2006
382
1
MacVille, USA
So, I have three divs on my page, left-column, center-column, right-column. My code is below, but I want the right-column to load before the center-column. Thanks in advance!

Code:
<body>
<div id="leftcolumn>Some content . . .</div>
<div id="centercolumn>Some content . . .</div>
<div id="righcolumn>Some content . . .</div>
</body>
 
As ChrisA said, html and css cascade down. They load from the first to the last, unless somehow affected by something else, like a onLoad rule with javascript. Also, though things start loading with the beginning code to the end, the rendering timing is effected by content file size.

For instance, if you have a 2mb background image on your <body> tag, it will probably display after your footer's 5kb image loads (assuming whatever main content also loads pretty quickly, such as plain text).
 
Would you mind giving us a link? Or could you maybe explain more your reasoning and the scenario of what is happening. You can do some tricky absolute positioning, etc... but even that might not help, depending on the file size of the content to be loaded in the various sections. A link would help us analyze why this is happening and the proper work arounds.

It would also help me to know why it's so important to load in that order.
 
Chris, that is pretty obvious. But my client wants two narrow columns to be on the left and right.

How does that change the idea of placing the right column HTML before the center? You can put the code in any order you want.
 
Below is an overview of my page. A few paragraphs on the left and right columns, and a constantly growing list down the center column. The right column doesn't load until the center column is finished loading, which I'm hoping to fix.

Code:
<body>
<div id="leftcolumn>Some content . . .</div>
<div id="centercolumn>Some content . . .</div>
<div id="rightcolumn>Some content . . .</div>
</body>

yes.png




But if I switch the order around as some have suggested, this is what I get:

<body>
<div id="leftcolumn>Some content . . .</div>
<div id="rightcolumn>Some content . . .</div>
<div id="centercolumn>Some content . . .</div>
</body>

no.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.