Php tables with css
Posted: Tue Jul 13, 2010 9:51 pm
Damn, I really hate to be a burden. This is the second time in about 4 hours I've posted with something that is probably a simple error.
Anywho, I'm trying to apply css to a table that I'm printing out with php. The code looks kind of like this.
the css is in a seperate file, the one I referenced with the link.
it looks like this
basically, the css doesn't work on the table, I've tried everything. Changing the classes to id's and back
applying the css to different parts. Changing where the table tag is in the html/php. I got nothing.
Anywho, I'm trying to apply css to a table that I'm printing out with php. The code looks kind of like this.
Code: Select all
<div id='info'>
<link rel='stylesheet' href='content-layout.css'>
<table class='infoTable'>
<?php
foreach($userInfo as $field => $value){
echo '<tr>';
echo "<td class='elements'>".$field."</td><td>".$value."</td>";
echo '</tr>';
}
?>
</table>
</div>
it looks like this
Code: Select all
body
{
margin: 0;
color: #666666;
background-color: #000000;
font-family: serif, verdana;
}
#info.infoTable
{
border: 1px solid #FFFFFF;
background-color: #666666;
padding: 5%;
}
applying the css to different parts. Changing where the table tag is in the html/php. I got nothing.