My site layout generally uses tables with no borders at all. So in my global css file I have:
Code:
TABLE
{
border-collapse: collapse;
empty-cells: show;
border: 0px;
padding: 0px;
margin: 0px;
background-color: #$background;
}
TD
{
padding: 4px;
background-color: #$background;
color: #$backtext;
margin: 0;
}
occasionally I would like to make a table that shows all the borders. (ie a normal html table with all grid lines)
Is there any way in css to override the default table and make a table with borders when the default table has none.
I have found one way, but it is ridiculously inefficient, css is so slick in everything else, is there a way to do what I need without resorting to the following:
Code:
TABLE.border
{
border-collapse: collapse;
border-width: 2px;
border: outset 2px;
}
TD.border
{
padding: 4px;
background-color: #$background;
color: #$backtext;
margin: 0;
border: inset 1pt;
}
Then labeling EVERY SINGLE DATA CELL class=border.
######## Question 2 ########
Also is there an easy way of only showing internal borders with css. You could do it with HTML 'rules', but support for them seems to have died after css came. What I want is a balence sheet table that shows the vertical and horizontal lines between datacells, but NOT the borders of the table. I just want the cells on the edges to have one open side.