Tables & load time (Full Version)

All Forums >> [Web Design] >> Site Critiques



Message


venicehigh -> Tables & load time (8/25/2005 22:20:34)

I'm using a very large table and it is creating a long load time. http://www.sarasota.k12.fl.us/vhs/contactus.htm

Any suggestions?

Also, my index.html does not load properly in Firefox.

Help on either of these issues is appreciated.

Thanks




Tailslide -> RE: Tables & load time (8/26/2005 3:21:40)

Hi

There's two things you can do to speed up the download time. The easy way and the really good way.

The easy way would be to have more than one table. Smaller tables will take less time to download than one big one.

The really good way is obviously more complicated.

Currently every single <td> tag you have is repeating the same formatting for it's cell all the way down the list. That formatting looks like this:

<td style="color: blue; font-size: 10.0pt; font-weight: 400; font-style: normal; font-family: Arial; text-align: general; vertical-align: middle; white-space: nowrap; border-left: .5pt solid windowtext; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px" width="20" height="16" align="center">
         </td>


That's a hell of a lot of code for a single cell. Repeat that however many times and you've got a heavy slow table.

If you were to format the whole table in one go using CSS then you'd cut the code down massively.

Something like this in the document head:

<style type="text/css">
td.faculty{ color:white; font-size:76%;font-family: Arial, sans-serif; text-align:middle;border:1px solid;padding:1px; width:20px; height:16px;}
</style>


Then you'd just have your table like this:

<table>
<tr><td class="faculty">Alden, Beverly</td><td class="faculty">beverly@emailaddress</td><td class="faculty">Koch, Judy</td><td class="faculty">judy@emailaddress</td></tr>


etc etc. A LOT less code.

If you wanted you could have two different classes so that the first one would be bold (the person's name) and the second one normal. Just add font-weight:bold into a second style and then change the class name.

This will speed up your table a lot.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125