The following code is used to find the center position of the any size of the screen. here i set the div in center of the screen using jquery.
"$(window).height()" this function is used to get hight of the window(Screen).
var divCenter= $('#div_id');
divCenter.css("top", ($(window).height() - divCenter.height())/2 + 'px');
You can change this code whatever you find like screen height, width etc.
0 comments:
Post a Comment