tags:

views:

58

answers:

2

Is it possible to put a table class in php, like this:

echo "<table  class='xd' border='1'>
<tr>
<th>IDNO</th>
<th>ADDRESS</th>
<th>LASTNAME</th>
<th>FIRSTNAME</th>

</tr>";

I have a table inside a table. The outside table is html. And if I only put table in the css. It will affect both. But when I put class in the table with php script. It won't work. Please help.

+2  A: 

yes, you can do so. if your css doesn't work, maybe your selector is wrong? (mixed up #bla and .bla ?)

oezi
+2  A: 

Will effect all tables on the page:

table {
}

Affects just tables with the class bla:

table.bla {
}
Fabian
I already tried that. but doesn't work. In the head portion
I guess it will be easier if you paste the sourcecode (from the browser when the page has loaded) on a paste site like http://pastebin.com/.
Fabian