Jump to content
  • Advertisement
Sign in to follow this  
wforl

[web] Table position

This topic is 3261 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!