PDA

View Full Version : Formatting multiple tables with CSS



stephsh
November 12th, 2009, 03:53 AM
I have created a table on my main .aspx page and have also inserted some predefined calendars using the 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:



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:



<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...



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...

n000bie
November 12th, 2009, 04:12 AM
class name starts with . i think u forgot that
.table-body {}

stephsh
November 12th, 2009, 04:22 AM
Thank you very much for the quick reply! it worked!