Forums
This topic is locked
Absolute centring of pages
Posted 13 Nov 2005 20:03:36
1
has voted
13 Nov 2005 20:03:36 miles smith posted:
Hi,I am fairly new to dreamweaver, and have been asked to create the following;
a site sized 800x600 to remain centred (vert+horiz) at all times. I have centred horizontically, but cannot for the life of me work out how to position it centred vertically.
ANY help on this would be much appreciated.
Thanks very much
Replies
Replied 14 Nov 2005 01:03:58
14 Nov 2005 01:03:58 Dave Thomas replied:
horizontal =
left: 50%;
magrin-left: -400px;
vertical =
top: 50%;
margin-top: -300px;
thats for 800x600, you set it to 50% half the dimension of the page, and then have a negative margin, to halve the element, thus absolutely centering it <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
regards
Dave Thomas
<b>DMX Zone Manager</b>
left: 50%;
magrin-left: -400px;
vertical =
top: 50%;
margin-top: -300px;
thats for 800x600, you set it to 50% half the dimension of the page, and then have a negative margin, to halve the element, thus absolutely centering it <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
regards
Dave Thomas
<b>DMX Zone Manager</b>