Hello all. I'm sorry if this is not the place to post this but please redirect me if its not. I have been active in a css forum about this and I will post that link below. Basically my style sheet is linked in my library.php page which is required in every page of my site. When i test it on a page echoing a table (see code below) I get perfect results. When I test it on the real code that I am trying to apply the css to, nothing happens. The output to the browser is identical so I have no idea what I am doing wrong. Ill put as much code in here as possible. Thanks in advance.
CSS Forum Discussion
This prints one post of a forum. It is contained in the lib.php page:
function print_one_post($postid, $level){
$postinfo = get_post_info($postid);
$post_str = '';
for ($i = 0; $i<$level; $i++){
$post_str .= ' <blockquote> ';
}
$post_str .= '<table class="forum-post-table">
<tr>
<td><img name="logo" src="" width="30" height="30" alt=""></td><td background="../themes/gradient.png">'.$postinfo['subject'].'<br>'.$postinfo['username'].' '.$postinfo['time_date'].'</td>
</tr>';
$post_str .= '<tr><td background="../themes/gradient.png"></td><td>'.$postinfo['message'].'<br><a href="postreply.php?id='.$postid.'">Reply</a></td></tr></table><br>';
for ($i = 0; $i<$level; $i++){
$post_str .= ' </blockquote> ';
}
return $post_str;
}
This is the page which uses the function above: View Posts
require('../lib.php');
$discussion_id = $_GET['id'];
$discussion_info = get_discussion_info($discussion_id);
$startlevel = $discussion_info['opening_post'];
echo '<body>';
echo $discussion_info['title'].'<br>';
$menuquery = "SELECT * FROM forum_posts WHERE discussion_id='$discussion_id' ORDER BY parent";
$result = mysql_query($menuquery) or die('An error occured retrieving data');
$listing = array();
while($row = mysql_fetch_array($result)){
$listing["$row[post_id]"] = array("id" => $row['post_id'],
"parent_id" => $row['parent']);
}
echo print_one_post($startlevel, 0);
echo display_tree($startlevel, 1, $listing, $arr);
echo '</body>';
This is the test page that works correctly:CSS Test Page
require('lib.php');
echo '<table class="forum-post-table">
<tr><td>Hello World!</td></tr>
</table>';
Thanks,
Ryan