A Complete Guide to Web Design

(やまだぃちぅ) #1
406 Chapter 23 – Cascading Style Sheets

Properties


Web Design in a Nutshell, eMatter Edition

text-top
Aligns the top of the element with the top of the parent element’s font
(its ascenders)
top
Aligns the top of the element with the tallest element on the line
Percentage values refer to the value of theline-heightproperty of the
element.

text-transform
Values:
none|capitalize|lowercase|uppercase
Example:
H1.title { text-transform: capitalize }
Applies to:
All elements
Inherited:
Yes
This property affects the capitalization of the element. The possible values are
as follows:
none
Displays the element as it is typed in the HTML source and neutralizes
any inherited value
capitalize
Displays the first letter of every word in uppercase characters
lowercase
Displays the whole element in lowercase characters
uppercase
Displays the whole element in uppercase characters

text-align
Values:
center|justify|left|right
Example:
DIV.center { text-align: center }
Applies to:
Block-level elements
Inherited:
Yes
This affects the horizontal alignment of the contained text elements. The
possible values arecenter,left,right, andjustify(aligns both the left
and right margins).
Free download pdf