|
||||
Centering Pages
If i would like to make my page display in the center of a browser...
for say a table. shall i position it with absolute positioning or using text-align: center? currently i am using absolute positioning.does the look varies between different browsers?
__________________
Quote:
|
|
|||
if you're using table-layout style then it's better to create a css class or id for the main table to be centre aligned. Simple example below:
in your HTML: <table class="mytable" width="800px"> .... </table> in your CSS file: body {text-align:center;} table.mytable {margin-left:auto; margin-right:auto;} *************************************** Or you can put your table tags within a DIV: <div align="center"> <table> .... </table> </div> There are a few more techniques... google 'em. |
|
|||
Right click on this page and view source
![]() Or just save the the complete page to your hard disk and open with front page or dreamweaver ![]() |
|
|||
Saving the complete page will save the CSS as well
![]() Anyway, i see that this page uses <table width="760" border="0" cellspacing="0" cellpadding="0" align="center" ............. Isn't it better to start from scratch in Dreamweaver or FP... make a table, set the bg color to white, center align it. Then set the body background blue. That's a good start ![]() Last edited by yonghs; 03-12-2007 at 10:46 PM. |
|
|||
You have to save as "Web page, complete" for the CSS file and images to be saved as well.
Or if you use firefox, you can install the Web Developer add-on (Web Developer) ... you can view all CSS of any page easily ... it has lots of other features too. Btw, I think WMM uses only internal CSS (all CSS inside the HTML/PHP file), so that's y you can't see any external CSS files. |
|
||||
what do you mean by "...centering 100 pages? or maintaining 100 pages?".. ?
was that supposed to be a CMS? The easiest still using css div: example - #masterdiv { width: 770px; margin: auto; } then.. place this BEFORE the 1st table of your page. (after body tags perhaps) <body> <div id="masterdiv"> <table goes here...> ... and close div at the end of </div> </body> Most of the CMS, normally had header.php and footer .php file.. you only need to see closely both file.. and the css file too.. ![]() |
|
||||
zzz..sorry..
ok the question is how to centerize my page? my problem was...i have been doing all the positioning with absolute positioning.. i didnt know bout text-align, margin auto, and all to centerize the page.. i guess i couldnt solve the prob with the divs i made for that positioning and make some changes yes i tried ...they work tqtq xD
__________________
Quote:
Last edited by tm89lee; 04-12-2007 at 04:58 PM. |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Frontpage to create web pages? | snmohamed | Webmaster Tools | 21 | 05-05-2007 01:37 PM |
| PR on all pages in website. What to do with it? | learning | Other Internet Marketing Methods | 12 | 10-07-2006 05:37 PM |
| How to start personal Wiki pages | melbourney | Website Programming | 3 | 14-08-2005 04:29 PM |
| password pages | ergoomo | Website Design | 3 | 05-08-2003 12:34 PM |
| Upload File & Crawling Web Pages to Get pdf + ps files | whit3_cryst4l | Website Programming | 2 | 23-10-2002 10:18 AM |













Linear Mode

