)
Avoid deprecated attributes: For instance, there??™s little point in setting the table??™s
height to 100% when many web browsers ignore that rule (or need to be in quirks
mode to support it).
Use CSS whenever possible to position elements: To give an example??”if you??™re
working with a 3-cell table and want the middle cell??™s content to begin 100 pixels
from the top of the cell, don??™t use a spacer GIF. Instead, provide the cell with a class
or unique ID, and use CSS padding.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
254
As I keep hammering home, CSS is the way to go for high-quality, modern web page layouts,
and tables should be left for the purpose for which they were designed??”formatting
data. The arguments that rumbled on for a few years after the 1990s came to a close??”that
browsers didn??™t support enough CSS to make CSS layouts possible, and that visual design
tools such as Dreamweaver couldn??™t cope with CSS layouts??”are now pretty much moot.
Even the previous major release of the worst offender (yes, I??™m talking about Internet
Explorer 6) has more than adequate support for the vast majority of CSS layouts, and anything
shipping today is more than capable of dealing with CSS.
In my experience, the main reason designers avoid CSS involves their not knowing how to
work with it. Suitably, then, the next chapter deals with this very issue??”showing how
to create page layout elements using CSS.
The last two of these rules are primarily concerned with ensuring that if you design for
legacy browsers, you don??™t compromise your work for more modern efforts.
Pages:
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354