Position Absolute Center of Page 
July 17th, 2007, 09:47 PM
|  | Forum Leader | | Join Date: Jul 2006 Location: Oklahoma
Posts: 1,077
| |
This is another example written by me that will put a div dead center of the window.
| 
February 20th, 2009, 05:07 PM
|  | Site Moderator | | Join Date: Oct 2006 Location: The Great White North :)
Posts: 4,940
| | | re: Position Absolute Center of Page
Where are you using the OffWindowH() and the WindowHeight() methods?
You've declared them but I don't actually see them being used.
| 
February 21st, 2009, 12:17 PM
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,487
| | | re: Position Absolute Center of Page
they are used in pHeight(), line #82.
| 
February 22nd, 2009, 05:07 PM
|  | Site Moderator | | Join Date: Oct 2006 Location: The Great White North :)
Posts: 4,940
| | | re: Position Absolute Center of Page
Oh, I see, thanks :)
| 
April 10th, 2009, 09:28 PM
|  | Expert | | Join Date: Jan 2008 Location: Bath, UK
Posts: 1,609
| | | re: Position Absolute Center of Page
But you can use the CSS alternative too. - body {
-
margin: 0;
-
}
-
#center_div {
-
position: fixed;
-
height: Hpx;
-
width: Wpx;
-
top: 50%;
-
left: 50%;
-
margin: -H/2px -W/2px;
-
}
| 
May 7th, 2009, 05:47 PM
| | Newbie | | Join Date: May 2009
Posts: 1
| | | re: Position Absolute Center of Page
Hi hsriat,
Thanks for the CSS, it worked perfectly for what I needed.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|