Page Layout: Style Sheets
Not only is page layout better addressed with style sheets,
but other cosmetic issues such as fonts and color are too.
If you view this site with a style-sheets supporting browser, you'll
find several interesting effects - most notably in the navigation menus.
The use of style sheets should go a long way
towards relieving web developers of the limitations of HTML for
presentation purposes, for which it was never intended.
Style sheets will be the best solution once browsers
that support them are widely deployed. They separate
presentation directives from structural markup and are
explicitly designed to address the presentation issues.
<div style="margin-left: 50pt">
Style sheets will be the best solution once browsers
that support them are widely deployed. They separate
presentation directives from structural markup and are
explicitly designed to address the presentation issues.
</div>
Note that the above example does not separate presentation from
markup, to keep the example simple; normally the style would be defined
in a separate style sheet. Again, please view source for a better
example.
Until
style sheet
capable browsers become widely deployed,
tables are the only realistic method for layout.
They were not originally intended for this purpose,
but rather for the display of tabular data, e.g. tables of numbers.
And you may well find that precise sizing is difficult to impossible,
though there are some tricks and workarounds, such as
using very small, possibly transparent, gifs as spacers.
HTML was wonderfully simple when NCSA's Mosaic
for X ignited the web explosion; it was meaningful then to talk about
document structure as represented by headings and lists.
Now our HTML coding has become obfuscated by complex tabular
arrangements attempting to achieve the layout of menus and navigation
bars, white space, pull-outs, and so on. Which can be a nightmare for
maintenance, and for software agents trying to translate web pages to
speech for the blind, or search engines trying to identify the real
content of your site (do software agents have dreams and
nightmares ?).
Style sheets will allow us to separate out the cosmetic issues from the
structural issues. HTML was never intended to be a DTP language.
There'll be a transitional period while we get used to style sheets,
and wait for browsers to implement them properly. In the interim our
HTML code will be at the peak of complexity; after that I hope and
trust that it'll again be possible to look at HTML code, and see at a
glance the structure of its content.
Page Layout: Tables
Page Layout, Margins, Indenting, and Columns
|