modal-box icon indicating copy to clipboard operation
modal-box copied to clipboard

keep modal window positioned in the center

Open ghost opened this issue 11 years ago • 3 comments

Will be good by default to have modal window always positioned to the center. suggested solution will be something like: JS: var width = $(this.container).width(), height = $(this.container).height(); $(this.container).css('margin-left', -(width / 2).toString() + 'px'); $(this.container).css('margin-top', -(height / 2).toString() + 'px');

CSS: .modal-container { position: absolute; top: 50%; left: 50%; }

ghost avatar Sep 09 '13 16:09 ghost

+1 on this.

xxvis avatar May 14 '14 19:05 xxvis

Perhaps include it as an option center: true/false

xxvis avatar May 14 '14 19:05 xxvis

+1

mlemartien avatar Jun 04 '14 15:06 mlemartien