Sign in to follow this  
wforl

[web] Table position

Recommended Posts

Hi Guys. Web development is really not one of my strong points. And was looking for some help. I have the following code, which draws, the header, a table, and then the footer.
<?php
require ("header.php");
?>

<div id="container">
    <div id="content">
		  
     			<table border="1" style="width:100%;">
          		<td style="width:100%;"> 
                	<div style="overflow:auto; height:600px"> 

						<?php
                        for($counter = 10; $counter <= 5; $counter += 1)
                        {
                            echo "<p>blah blah blah </p>";
                        }
                        ?>

        		</div>
        		</td>
			</table>
		
	</div>
</div>

<?php
require ("footer.php");
?>



But the size of the table has a predefined size. What im looking for, is a way to say. - Draw Header - Draw a table, starting 25px at the bottom of the header, and ending 25px above the top of footer - Draw Footer How would i go about doing this? Ive been playing with positions, such as absolute, and fixed, but they always start at the top of the page, rather than underneath the header. thanks for reading

Share this post


Link to post
Share on other sites
You could give your table a margin-top and margin-bottom of 25px.

If, however, you want the footer to snap to the bottom of the viewport or bottom of the content (whichever's tallest) and have the table stretch to fill the available space (minus the margins) - "good luck". [wink]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this