[thelist] CSS and tables
Darrell King
darrell at webctr.com
Mon May 7 15:35:43 CDT 2001
Warning: YMMV with these attributes....
to redefine ALL tables:
table {
padding: 0;
margin: 0;
border-width: 1;
border-color: #000000;
border-style: solid;
}
...or, to define a class you can then assign to tables at will:
.myTable {
padding: 0;
margin: 0;
border-width: 1;
border-color: #000000;
border-style: solid;
}
The first needs no further reference in your pages, but will make all tables identical unless an overriding class is assigned to a given table.
The second can be applied to selected tables by applying the class attribute top the table tag:
<.table class="myTable>
Note: you can also shorthand the border:
border: #000000 solid 1;
Be sure to check your results on all targeted platforms, as implementation of border, margin and padding varies considerably.
D
On Mon, 7 May 2001 14:47:04 -0400
Cancilla Dominick <cancilla.d at buckconsultants.com> wrote:
:I'm a newbie to hand-coding CSS (I usually just use Dreamweaver or another
:such tool to make my style sheets). Can someone tell me how to set up a
:style for a table which includes padding, spacing, and cell border width and
:color? I can't figure out how to do this but am assuming (perhaps foolishly)
:that it's possible.
:
:--Dominick
:
More information about the thelist
mailing list