• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Rapid Rows, Cruising Columns:... > Table Centering in the Here and Now

Table Centering in the Here and Now

The center attribute for tables has gone the way of all deprecated tags—out the door into the cold. So, what’s the best way to center your tables using CSS? To get the most coverage across browsers, you’ve got to take a two-class approach: one class to center align a <div> that goes around a table, and another to handle the table directly. The centered <div> CSS is pretty straightforward:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint