IceDragon Posted July 27, 2008 Share Posted July 27, 2008 I am trying to set up a table that would cover the whole website (for main page - in the middle of a page there would be a main image and at the bottom a copyright image.), but instead the table only covers a small portion at the top (width fits right but height doesn't) <body> <table width="100%" height="100%" cellpadding="0" border="0" cellspacing="0"> <tr height="95%"> <td align="center"><img src="main_img.jpg" /></td> </tr> <tr height="5%"> <td align="left"><img src="copyright.jpg" /></td> </tr> </table> </body> anyone knows whats wrong with the code? Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/ Share on other sites More sharing options...
secoxxx Posted July 27, 2008 Share Posted July 27, 2008 You should be using divs. you wont have the same results in multiple browsers with tables. Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/#findComment-601049 Share on other sites More sharing options...
IceDragon Posted July 27, 2008 Author Share Posted July 27, 2008 i tried but i can't seem to be able to get the copyright img appear at the bottom of the site.. It places it just below the main_img.jpg Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/#findComment-601080 Share on other sites More sharing options...
IceDragon Posted July 27, 2008 Author Share Posted July 27, 2008 never mind. I've managed to fix it <style> #Header {height:180px; position:absolute; left:38%; top:15%;} #Footer {height:30px; position:absolute; bottom:0px;} </style> <div id="Header" align="center"><img src="main_img.jpg" /></div> <div id="Footer" align="left"><img src="copyright.jpg" /></div> </body> Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/#findComment-601092 Share on other sites More sharing options...
secoxxx Posted July 27, 2008 Share Posted July 27, 2008 .footer { position:absolute; bottom:0; width:100%; } <div class="footer">Footer</div> Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/#findComment-601094 Share on other sites More sharing options...
IceDragon Posted July 27, 2008 Author Share Posted July 27, 2008 Thanks man. I forgot about the width. Link to comment https://forums.phpfreaks.com/topic/116882-solved-table-height/#findComment-601101 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.