Forum Moderators: coopster

Message Too Old, No Replies

Marking page

         

orion_rus

9:51 am on Nov 17, 2004 (gmt 0)

10+ Year Member



Hello world,
I have a site for 1024x768 resolution, but if user would have 1280x1024 or more i need to place all content to the center of the window, how i can make it with php advantages?

bloke in a box

10:17 am on Nov 17, 2004 (gmt 0)

10+ Year Member



Could you not just use CSS to centre the site in the middle of the page anyway.

If the user is at 1024 by 768 then the site will be justified properly anyway, any resolution larger than that will appear centered on the page?

mincklerstraat

10:24 am on Nov 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd have to chime in with Bloke here, Orion; it sounds like this would best be solved with css. I personally find sites that aren't centered a bit irritating to look at, so I'd guess that centering is the best way to maximize your visitors.

Welcome to Webmasterworld [webmasterworld.com], Bloke.

orion_rus

1:26 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



But how i can centered it with css, i can use a table with relative positioning, but i need to load all phps only in this cell?

mincklerstraat

2:15 pm on Nov 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If a table will do it for ya, go with the table -- css provides a lot of advantages, but none if you aren't already a little handy with it. Remember, PHP can be used for outputting HTML - if it's just one table cell that needs PHP functionality, then inside that table cell
<?php echo 'your stuff here';?>
- otherwise, you can make PHP output the tablecell itself - or the entire HTML page, for that matter. They are really two separate things, PHP and HTML, although in an actual file they're intertwined - HTML is what the browser gets, tags and content; PHP is just a way of processing information, saving it if you need to, and outputting HTML, wherever you need it - tables, tags, contents, headers, whatever.

bloke in a box

2:19 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



Nothing to stop you using another table of width 100% and one row / column to center your other table in the middle.

Personally I would opt for the use of CSS and divs to center the table.

orion_rus

3:30 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



If i have a table i have some clear space between top border and content.
I don't know how to fix it and it upsets me. It seems like
¦---------------------------------------¦
¦ ¦
¦ ¦
¦<<start of content>> ¦
i don't know how to fix this header((

bloke in a box

3:44 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



You using

<table width="100%" cellpadding="0" border="0" cellspacing="0">

on the original table?

orion_rus

8:07 am on Nov 18, 2004 (gmt 0)

10+ Year Member



Thanks for what, i'm correct it already)
I wish u good luck