# Formatting multiple tables with CSS

**URL:** https://forum.kirupa.com/t/formatting-multiple-tables-with-css/299891
**Category:** web dev
**Created:** [November 12, 2009, 8:53am UTC](https://forum.kirupa.com/t/formatting-multiple-tables-with-css/299891 "2009-11-12T08:53:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stephsh](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@stephsh](https://forum.kirupa.com/u/stephsh)
#### Post date: [November 12, 2009, 8:53am UTC](https://forum.kirupa.com/t/formatting-multiple-tables-with-css/299891/1 "2009-11-12T08:53:54Z")

</div>

I have created a table on my main .aspx page and have also inserted some predefined calendars using the [ASP.NET](http://ASP.NET) web controls. I would like to format my own table without formatting the calendar tables. When I used the following CSS code all tables were formatted as specified:

```php

table {
border: 2px solid;
border-color: #2B3856;
margin: 0 auto;
}

```

I therefore specified that I only wanted the table named “table-body” to be formatted:

```php

<table class = "table-body"><tr><td> (...) </table>

```

I receive an error message that class “table-body” isnt defined, even though i defined it in the stylesheet…

```php

table-body {
border: 2px solid;
border-color: #2B3856;
margin: 0 auto;
}

```

I tried different combinations: putting both “table” and “table-body” in CSS, just “table-body” etc…
