Table Layout in CSS by Eric A. Meyer

Table Layout in CSS by Eric A. Meyer

Author:Eric A. Meyer
Language: eng
Format: mobi, epub, pdf
Publisher: O'Reilly Media, Inc.
Published: 2016-06-07T16:00:00+00:00


Figure 1-8. The layout of a table row using the collapsing borders model

The specification includes a layout formula that I’ll reproduce here for the benefit of those who enjoy such things:

row width = (0.5 * border-width-0) + padding-left-1 + width-1 + padding-right-1 + border-width-1 + padding-left-2 +...+ padding-right-n + (0.5 * border-width-n)

Each border-width-n refers to the border between cell n and the next cell; thus, border-width-3 refers to the border between the third and fourth cells. The value n stands for the total number of cells in the row.

There is a slight exception to this mechanism. When beginning the layout of a collapsed-border table, the user agent computes an initial left and right border for the table itself. It does this by examining the left border of the first cell in the first row of the table and by taking half of that border’s width as the table’s initial left border width. The user agent then examines the right border of the last cell in the first row and uses half that width to set the table’s initial right-border width. For any row after the first, if the left or right border is wider than the initial border widths, it sticks out into the margin area of the table.

In cases where a border is an odd number of display elements (pixels, printer dots, etc.) wide, the user agent is left to decide what to do about centering the border on the grid line. It might shift the border so that it is slightly off-center, round up or down to an even number of display elements, use anti-aliasing, or adjust anything else that seems reasonable.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Deep Learning with Python by François Chollet(12587)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7787)
Autodesk Civil 3D 2024 from Start to Finish by Stephen Walz Tony Sabat(6566)
Mathematics for Game Programming and Computer Graphics by Penny de Byl(6449)
Taking Blender to the Next Level by Ruan Lotter(6230)
Express Your Creativity with Adobe Express by Rosie Sue(6051)
Hands-On Unity 2022 Game Development - Third Edition by Nicolas Alejandro Borromeo(5659)
Hands-On Unity 2022 Game Development by Nicolas Alejandro Borromeo(4770)
Adobe Illustrator for Creative Professionals by Clint Balsar(3680)
Unreal Engine 5 Character Creation, Animation, and Cinematics by Henk Venter & Wilhelm Ogterop(3631)
Going the Distance with Babylon.js by Josh Elster(3606)
Mastering Graphics Programming with Vulkan by Marco Castorina & Gabriel Sassone(3509)
Squeaky Clean Topology in Blender by Michael Steppig(3448)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2923)
Unreal Engine 5 Character Creation, Animation, and Cinematics by Henk Venter
 Wilhelm Ogterop(2875)
Rapid Viz: A New Method for the Rapid Visualization of Ideas by Kurt Hanks & Larry Belliston(2703)
The 46 Rules of Genius: An Innovator's Guide to Creativity (Voices That Matter) by Marty Neumeier(2659)
Learn Qt 5: Build modern, responsive cross-platform desktop applications with Qt, C++, and QML by Nicholas Sherriff(2369)
Fusion 360 for Makers by Lydia Sloan Cline(2223)
Hands-On Neural Networks with Keras by Niloy Purkait(2170)