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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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> Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted May 10, 2007 Share Posted May 10, 2007 <td align="center"> Quote Link to comment 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. Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted May 10, 2007 Share Posted May 10, 2007 <table align="center"> Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.