oceans Posted May 10, 2007 Share Posted May 10, 2007 Friends, I have made a page with small width so that a samller screen can show the whole content, now the issue is the page get left oriented. how can I get it to be center screened. thanks. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/ Share on other sites More sharing options...
mmarif4u Posted May 10, 2007 Share Posted May 10, 2007 I dont think this is the php issue, u can jump to html or css forum for it. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249632 Share on other sites More sharing options...
oceans Posted May 10, 2007 Author Share Posted May 10, 2007 hahaha, you will be surprised i am alone there, can any one who came accross this problem could help. All i want is to centre the body to a screen that is all. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249638 Share on other sites More sharing options...
flappy_warbucks Posted May 10, 2007 Share Posted May 10, 2007 I think i would be tempted to use tables for example: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <table border="0" cellpadding="0" cellspacing="0" width="780"> <!-- your cells in here //--> </table> </td> </table> Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249639 Share on other sites More sharing options...
oceans Posted May 10, 2007 Author Share Posted May 10, 2007 Thanks Friend, Let us get in Sync I am using tables, i want to centre the outermost table to the screen currently this table is left oriented relative to screen. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249642 Share on other sites More sharing options...
runnerjp Posted May 10, 2007 Share Posted May 10, 2007 <td align="center"> Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249643 Share on other sites More sharing options...
oceans Posted May 10, 2007 Author Share Posted May 10, 2007 no friend, not working, i believe this will center the content in a table, but i want to center the whole table to a screen. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249647 Share on other sites More sharing options...
flappy_warbucks Posted May 10, 2007 Share Posted May 10, 2007 no friend, not working, i believe this will center the content in a table, but i want to center the whole table to a screen. thats what that code snippet i gave earlier does. u make a global table (the one with a width of 100% that spreads it across the screen no matter what screen size) and then you create a cell (the one that says <td align="center"> and that will be the witdth of the screen and center aligned) and then you put your actual table with the site in it in there. that *will* center align the whole page, i know because i use that very method myself, as i hate non-centered sites! Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249651 Share on other sites More sharing options...
mmarif4u Posted May 10, 2007 Share Posted May 10, 2007 <table align="center"> Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249654 Share on other sites More sharing options...
Wicky Posted May 10, 2007 Share Posted May 10, 2007 Well you got two ways to do it First put a table in a div like so. <div><table></table></div> and you center the div instead ....<div align="center"><table></table></div>. Or just center the table by using the body tag ......i aint sure how to do that within the tag, but it can be done with css. However i suggest u use div cause its more efficient and controllable than the body tag Cheers. Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249660 Share on other sites More sharing options...
runnerjp Posted May 10, 2007 Share Posted May 10, 2007 http://www.hitmill.com/html/tables/lesson2.html .... this should explain it all Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249661 Share on other sites More sharing options...
oceans Posted May 10, 2007 Author Share Posted May 10, 2007 Friends, we have solved, I did the following, <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><table width="769" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> bla bla bla.... Link to comment https://forums.phpfreaks.com/topic/50773-solved-centering-a-page-in-the-sceen/#findComment-249663 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.