O'Reilly logo

Getting StartED with CSS by David Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. How Do I Style Tables?

Tables seem to be the most divisive of all HTML elements—you either love 'em or hate 'em. For years, they were the only way to build a grid structure to lay out web pages. But tables work in a unique way. The height of each row is determined by the tallest object in the row, and the width of each column is determined by the widest object in the column. Just when you think you have everything nicely aligned, you add something slightly bigger in a table cell, and the whole table structure shifts.

Thankfully, tables are no longer necessary—or indeed recommended—for page layout. Normally, they should be used only for the display of data that needs to be presented in a grid format—timetables, price lists, sports results, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required