views:

38

answers:

1

I have this code on my print.css:

#header, #tae, #nav, .noprint {display: none;}                          
width: 100%; margin: 0; float: none;

In order not to display the elements within those div tags. But I don't know with the code below why it isn't cooperating. If I place the div tags on it. And then I hit the print button. I see no output. Here it is:

<div id="tae">

<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
    <tr>
        <td class="text1" style="height: 50px;">xd627 information management system</td>
    </tr>

    <tr>
        <td class="bg5"><table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
            <tr align="center">
                <td><a href="userpage.php" class="link1">Homepage</a></td>
                <td><a href="RegStuds.php" class="link1">Database</a></td>

                <td><a href="#" class="link1">About</a></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
        </table></td>
    </tr>



    <tr>


        <td valign="top" class="bg6">&nbsp;</td>
    </tr>
    <tr>

        <td><table width="780" border="0" cellspacing="0" cellpadding="0">
                <tr valign="top">
                    <td width="20">&nbsp;</td>
                    <td width="297"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>

                                <td><img src="images/spacer.gif" alt="" width="30" height="30" /></td>
                        </tr>


                            </tr>
                            <tr>
                                <td class="text2">

 </div>



   <div id="max">

<?php

//some php code in here showing a mysql table.

?>

</div>

What's wrong with my code? Does the php script depend on the one where I put the div tag in? What do I do? All I want to show up in my page when printed is the mysql table. I'm using Universal Document Converter to simulate printing.

A: 

The HTML in that snippet is broken and the entire document is contained in #tae, thus nothing will print as everything is in a container that is display: none;

Here's a cleaned up version of that markup.

<div id="tae">
    <table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
        <tr>
            <td class="text1" style="height: 50px;">xd627 information management system</td>
        </tr>
        <tr>
            <td class="bg5">
                <table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
                    <tr align="center">
                        <td><a href="userpage.php" class="link1">Homepage</a></td>
                        <td><a href="RegStuds.php" class="link1">Database</a></td>
                        <td><a href="#" class="link1">About</a></td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td valign="top" class="bg6">&nbsp;</td>
        </tr>
        <tr>
            <td>
                <table width="780" border="0" cellspacing="0" cellpadding="0">
                    <tr valign="top">
                        <td width="20">&nbsp;</td>
                        <td width="297">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <img src="images/spacer.gif" alt="" width="30" height="30" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="text2"></td>
                                </tr>
                                <!-- All this is missing, from here... -->
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</div>
<!-- ...to here. -->


<div id="max">

<?php

//some php code in here showing a mysql table.

?>

</div>
Zack