Guest_imported
New member
- Jan 1, 1970
- 0
OK, so I found some code which allowed me to center the entire content of my web page. BTW all content is theoretically in one table, but various images etc. use absolute positioning, so making the table center leaves them in the same place. BUT if I specify the table to use absolute positioning as well I CAN move everything around. Here's the code I used to center the content:
<div style="position: absolute; top: 0; left: 50%; margin-left: -390; width: 780; height: 660">
This comes just after the background colour and links colour declaration and before the table html.
So basically the way it works is to move my content 1/2 the users SREEN SIZE to the right and then half the CONTENT back again (-390). So, the problem. Well, this works great for 800x600 resolution and above (BTW each page is designed to fill an 800x600 screen excatly), but on a 640x480 the content drifts into a negative position - off screen left. Does anyone have a solution, or is there some JavaScript which 'll do this properly?? There must be a solution it's rediculous - and no, I'm not going to redesign for 640x480 or add script to recognise a users screen size!!
Thanks for your help in advance
<div style="position: absolute; top: 0; left: 50%; margin-left: -390; width: 780; height: 660">
This comes just after the background colour and links colour declaration and before the table html.
So basically the way it works is to move my content 1/2 the users SREEN SIZE to the right and then half the CONTENT back again (-390). So, the problem. Well, this works great for 800x600 resolution and above (BTW each page is designed to fill an 800x600 screen excatly), but on a 640x480 the content drifts into a negative position - off screen left. Does anyone have a solution, or is there some JavaScript which 'll do this properly?? There must be a solution it's rediculous - and no, I'm not going to redesign for 640x480 or add script to recognise a users screen size!!
Thanks for your help in advance