Tuesday, September 17, 2013

emasculation of HTML tables via... display: block;

Slap this CSS on a table! If the table had one row of six cells, the cells will now each behave like div tags following each other vertically. Everything that was tablelike about the table is gone. Unbelievable! This comes from another smart person I work with, Stepan Riha. I am no slouch to CSS and I knew you could manhandle much, but this really surprised me.

.foo
{
   display: block;
}
 
.foo tbody
{
   display: block;
}
 
.foo tr
{
   display: block;
}
 
.foo tr td
{
   display: block;
}

No comments:

Post a Comment