[WEB4LIB]
Tom Keays
tomkeays at gmail.com
Sun Mar 6 07:53:23 EST 2005
My experience is that the div layout does NOT significantly reduce the
size of the files, since any place you would have had a row or column
in the table will likely still require at least one (often two nested)
div tags. Add in the CSS itself, and you might actually INCREASE the
size of the files.
What you save on is the speed at which the page renders -- and that is
not inconsiderable in most cases. That said, stylesheets often bloat
up -- especially if you're borrowing an existing stylesheet and
applying it to a new site -- with tags that are not being applied. Do
an analysis of your site and see what classes and IDs are actually
being used and snip out (and set aside in case you need them later).
Look at all the unclassed tags (p, span, a) and see if there is
redundancy that can be snipped out.
I've been using "The CSS Anthology : 101 Essential Tips, Tricks and
Hacks" by Rachel Andrew as a reference lately and have found it to be
a good guide. "DHTML and CSS for the World Wide Web: Visual QuickStart
Guide (2nd Edition)" by Jason Cranford Teague was my previous favorite
reference.
http://www.amazon.com/exec/obidos/tg/detail/-/0957921888/
http://www.amazon.com/exec/obidos/tg/detail/-/0201730847/
On Fri, 4 Mar 2005 15:01:27 -0800 (PST), Smith, Sarah
<sarah.smith at fresnolibrary.org> wrote:
> I'm tinkering around with converting a website from a table layout to a
> div layout, and I've managed to get identical appearance. The div and
> table based html files are identical in line length, and the CSS file
> for the div based layout is longer than the CSS file for table based
> layout. I only noticed because I ran a "Speed Report" from the Firefox
> Web Developer's toolbar and it said my CSS file was twice the
> recommended size.
> My question is: does/should separating content from layout reduce the
> number of lines of coding needed? Size of files? Etc...
--
Tom Keays / tomkeays at gmail.com
More information about the Web4lib
mailing list