Forum: Ruby on Rails window size

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Newb N. (Guest)
on 2008-12-03 07:50
I hope someone could help me on my problem.
I want to show my div(User Add Form) at center of the browser
window.like pop up window.the Pop-Up has to be shown at center of the
browser's window
I used this code.In FireFox 3.
element.style.top = ( 0 + ( window.innerHeight )/2 - ( dimensions.height
)/2 ) + 'px';
element.style.left = ( window.innerWidth )/2 - ( dimensions.width )/2  +
'px';
but it was not positioned center.
Pls help me up.
Ryan B. (Guest)
on 2008-12-03 08:33
(Received via mailing list)
This is not a rails question. Please ask it elsewhere.
-----
Ryan B.
Freelancer
http://frozenplague.net
This topic is locked and can not be replied to.