Prev | Current Page 127 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

As illustrated here in Figure 3.24, a little styling can produce
a much more professional look.
STYLIN??™ FONTS AND TEXT 95
FIGURE 3.24 Superscripting and
subscripting text lets you vary the
vertical position of that text from
the standard baseline. I have some
styles in my standard text style sheet
that improve the look of the default
styling of these tags, as this example
illustrates.
So while the XHTML tags sup and sub create superscript or subscript
text automatically, it??™s worth using vertical-align and text-size in
combination to produce a more pleasing result.
Here??™s the code for this example



This example uses default settings of the xhtml tags
"sub" and "sup"


Enjoy mountain spring H2O ??“ it's 105
times better than tap water!


This means water provided through a
municipal distribution system


This example uses classes for custom vertical alignment
and type sizes


IE7 appears to have a hard time with
sub- and superscripting, leaving large
spaces around those characters.


Pages:
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139