i want to open a div in center of my screen ( horizontally and vertically).

```
var documnetWidth = $(document).width(),
  documentHeight = $(document).height(),
  widgetFormHeight = widgetForm.height(),
  widgetFormWidth = widgetForm.width();

widgetForm.css({
  top: documentHeight / 2 - widgetFormHeight / 2,
  left: documnetWidth / 2 - widgetFormWidth / 2
});

```

my widget is coming horizontally center but vertically it takes some offset.