Page layout - align left or align center?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

How do you like to align your pages?

To the left
1
6%
To the centre
14
78%
There is another way
3
17%
 
Total votes: 18

User avatar
Toneboy
Forum Contributor
Posts: 102
Joined: Wed Jul 31, 2002 5:59 am
Location: Law, Scotland.
Contact:

Post by Toneboy »

Gen-ik wrote:Just wanted to point one thing out...

Code: Select all

<script language="JavaScript1.2"> 

window.location.replace("<? echo $PHP_SELF ?>?pagewidth="+screen.width); 

</script>
.. that would give the you width of the users screen/desktop not the actual browser width.
I did some reading on that. The general consensus seems to be take the screenwidth and subtract 50 for a suitable pagewidth. My code was then going to be along the lines of this:

Code: Select all

if ($pagewidth){
// set width of page
$pw = $pagewidth - 50;
}
... and develop it from there.

I was also planning to make an off-shoot of the theme system I use where users can also select a different definition of their choice to view the site with.
Gen-ik wrote:Another thing is if you're planning to align stuff on your website (maybe attempting to center an 'absolute' div) remember that if someone resizes the browser your alignments are going to get messy.

This is ok with IE because you can easily detect when the browser is resized so can recalculate the postions of objects. With other browsers (NS for example) this becomes a pain in the arse due to the fact they are not too good when it comes to detecting if the browser has been resized.


But, if you're not doing any of that then it's ok :)
Okay, now I'm really lost. Will have to look up absolute divs and learn about them.

In saying that what I will probably do (at least with http://www.trulybizarre.co.uk) is make the centre portion (which is text on most pages) flexible so hopefully it shouldn't matter too much.
Gen-ik wrote:EDIT: Just one more thing... not all browsers can use window.location.replace. It might be worth doing a couple of if() calls to check for window.location and window.location.href as well.
Another thing for me to check out. I've just downloaded Mozilla (not keen as yet, I have to say), will download Opera again and continue to test as I go.
Post Reply