To affect the horizontal alignment of the
caption text, use the text-align
property.
The caption box is positioned relative
to the table box. See Table Formatting
Example
This style rule positions all table captions
below their parent tables:
caption {
caption-side: bottom;
}
(p. 168) for details.
Value
bottom puts the caption below the table box
top puts the caption above the table box
CSS2 also defined the values left and right for this property, but they were
removed in CSS2.1.
Compatibility
SPEC
version initial inherited
CSS2, 2.1 top YES
BROWSER SUPPORT
Op9.2+ Saf1.3+ FF1+ IE7
FULL FULL FULL NONE
Opera Safari Firefox Internet Explorer
9.2 3.0 2.0 1.3 2.0 1.5 1.0 7.0 6.0 5.5
Full Full Full Full Full Full Full None None None
Internet Explorer for Windows versions up to and including 7 don??™t support this
property.
Other Relevant Stuff
display (p. 264)
controls the type of box generated by an element
text-align (p. 330)
sets the horizontal text alignment
The Ultimate CSS Reference 298
Chapter 11
Color and Backgrounds
These properties allow the author to control the foreground and background color
of elements and the placement of background images.
Pages:
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445