This is a migrated thread and some comments may be shown as answers.

How to center the window popup when height is not set?

3 Answers 471 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 05 Oct 2016, 04:14 AM
I have a window that doesn't have its height set, so its height is dynamic based on the window content. Adding .center() doesn't center the window. How do I center the popup when the height isn't set?

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 06 Oct 2016, 07:29 AM

Hello Chris,

You can call the center method after applying the height. Like in this dojo: http://dojo.telerik.com/ayALU

Regards,
Ianko
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Chris
Top achievements
Rank 1
answered on 06 Oct 2016, 05:53 PM

Hi Ianko,

I guess my question should be reworded properly. How do I center the window popup horizontally? because I dont want to set the height, I have a window that has tabs in it and inside the tabs the content heights are different. So I would like to not set the height so the window height will change dynamically based on the height of the content, so is it possible to center the window horizontally?

0
Ianko
Telerik team
answered on 07 Oct 2016, 04:55 AM

Hello Chris,

You can again use the center() method on every tab click/select. It will center the dialog window both vertically and horizontally. I assume that the width is the same for each tab container and the actual final result would be a horizontal centering.  

If this is not the case and the above suggestion does not work, try reproducing this in a dojo (dojo.telerik.com) so that I can take a proper look at the problem.

Regards,
Ianko
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Window
Asked by
Chris
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Chris
Top achievements
Rank 1
Share this question
or