PDA

View Full Version : Page 'jumps' on loading


Coober
07-27-2005, 07:59 AM
I have just put a site 'live'. The layout is structured using tables. When loading the pages using Firefox 1.0.5 the tables seem to be all over the place for a brief moment, before jumping back to where they belong.

This doesn't happen in any other browser I've tried though.


The site is here ('http://www.thegardenhouse.co.za')

Can anyone tell me why and how to prevent it?

Thanks,

Coober

Coober
07-28-2005, 09:36 PM
For anyone that's interested, I now know that the reason is because of all the "colspan" attributes that DW inserts when using layout mode.

Having re-written the page (without using layout mode) all is well.

Coober

kate
07-29-2005, 06:43 AM
Hya coober,

Many thanks for returning to let us know about the solution, that was very nice of you.

:) :)

Jim_Shady
07-29-2005, 08:43 AM
Hey there,

You say that 'all is well' but I use firefox and when I loaded the page it did still 'jump' ?

Shady.

Coober
07-29-2005, 09:03 AM
I haven't re-written all the site yet. Only this page:

Here's the only re-written page! ('http://www.thegardenhouse.co.za/indexNewTables.htm')

I'm still surprised that this only happened in Firefox.


Coober

kate
07-29-2005, 09:04 AM
Coober check ALL browers and OS if at all possible get friends to check.

Windows:
Firefox:
Safari: Mac
Linux:
Solaris: Sun Java system
Tiger: Mac
Probably a load more out there but those are the main OS as far as I know.

;)

ranjan
07-30-2005, 04:12 AM
Consider the following code:


<table width="">
<tr>
<td width="10"></td>
<td width="60"></td>
<td width="20"></td>
</tr>
</table>


Now here is Browser "A" reading the code

"A" say:

Now thats a table that needs to be drawn on the viewport. Hmmm whats the width, hey its not specified, so let me fill the whole viewport width with the table. Ahhh atleast the designer has specified the first cell's width. 10 pixels! Cool ! I can draw that.

My holy pixels! This designer is sure better than most others he has not forgotten the second cell width! Its 60 pixels. Thats easy! Now to the last one

My confidence in this designer is not misplaced the third cell is 20 pixels and this is the last cell. I am going to drawn it!

Hey 10+60+20 is 90pixels. That should be the width of the table, I made a mistake when i drew it, let me redraw it with correct width, If I am quick enough the end user may not see the redraw flash ;)

Coober yells:

YA BETCHA I SAW THAT FLASH!!!!

Browser B on the other hand may be smarter and calculate the the width in the first place

Moral: YOU DO THE MATH!!! Saves browsers the trouble and page loads are faster and no flashes

Coober
07-31-2005, 11:46 AM
Thanks Ranjan, I'll get my calculator out and start adding :).

Coober