Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Design

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2007, 12:47 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
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:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-12-2007, 12:57 PM
New kid on the block
 
Join Date: Dec 2007
Location: Canada
Posts: 3
Rep Power: 0
Kalina is on a distinguished road
Neither, you put align="center" in the table tag. IE; <table align="center" width="yourwidth">
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-12-2007, 03:19 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
aren't you customizing the layout with HTML using that?
that might sound good if you are centering 1 page..
but wha if you are centering 100 pages? or maintaining 100 pages?
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-12-2007, 03:50 PM
Senior Webmaster
 
Join Date: Apr 2007
Location: Penang
Posts: 472
Rep Power: 28
yonghs is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-12-2007, 04:14 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
hmmph..aiyak
i wish to refurbish my question..
not table..
lets says...
hmm like this webmaster forum..
it appears in the middle...
with left and right blue..
thats the one...
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-12-2007, 07:53 PM
Senior Webmaster
 
Join Date: Apr 2007
Location: Penang
Posts: 472
Rep Power: 28
yonghs is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-12-2007, 08:04 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
If the CSS is called from an external file..it is not possible to access it
opening in Dreamweaver is again editing in HTML not CSS rite?

Checked the source,
So much code...hmmph..but there isnt any text-align in the CSS part
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-12-2007, 10:43 PM
Senior Webmaster
 
Join Date: Apr 2007
Location: Penang
Posts: 472
Rep Power: 28
yonghs is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-12-2007, 11:27 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
har? it saves the CSS also? i dun think so...
if u just link the CSS at head...u r hiding the CSS d

What do you mean by start from scratch? i am already in the middle of it..
i use absolute positioning to position it in the center..
but the i stumble upon another solution which is setting margin, text-align on the CSS
so i dunno which is the "umph" way of it
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-12-2007, 08:35 AM
Senior Webmaster
 
Join Date: Apr 2007
Location: Penang
Posts: 472
Rep Power: 28
yonghs is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 04-12-2007, 09:46 AM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
ooo...i've seen that but never thought it would be that useful~

still havent solve my problem yet
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-12-2007, 10:30 AM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,633
Rep Power: 142
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
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..
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-12-2007, 01:51 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
hmmph..
i was saying that cuz it was not adviseble to style the layout within html...

u mentioned bout tables only or any div at all? if it is any div at all?
__________________
Quote:
DonT ShoW to ShOw pls ppl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 04-12-2007, 02:48 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,633
Rep Power: 142
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
1 - You screw up your question.
2 - Don't make people more confused on what you doing / want to do.
3 - Have you tried any of suggested solution here?
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 04-12-2007, 04:22 PM
tm89lee's Avatar
Inspired Webmaster
 
Join Date: Mar 2006
Location: Kuantan
Posts: 182
Rep Power: 35
tm89lee is on a distinguished road
Send a message via MSN to tm89lee Send a message via Yahoo to tm89lee
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:
DonT ShoW to ShOw pls ppl

Last edited by tm89lee; 04-12-2007 at 04:58 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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