Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Munz
Employee
Employee

Center Align Document Extension

I've often heard requests for an extension that can center align a QlikView document, and I recently built one for the Global Games app.

One difference between that one and the one I'm posting here, is that that version also places a new background image on the page.

So, non-technically, this extension will take your app and align it to the center of the window, including the tabs.  It also centers any background image on the app as well, so if you have a background image that is wider than the content area of the app, it could cause that background image to look strange.

A little more technically...since QV uses all absolutely positioned elements, it's difficult to determine the width of the content area, but I was able to do that in this extension in order to center it.  The one issue is that if there is a smaller width the content area, it will center based on that small area and look strange.  So, the default width that it sets the document to is 1024 pixels.  If the extension determines the app is wider, it will center properly for that width.

Even more technically...all the extension is really doing is wrapping the content area (the PageContainer div) inside a div with a class of "master."  Then, the extension just determines the content area width, and centers that content in the master div.

ANYway, hopefully this helps some people out.  I haven't tested in QVS yet, but it should work in QVS also.

Thanks.

EDIT: I modified the extension I originally posted to ensure the aligning updates when switching between sheets of different widths.

26 Replies
Not applicable

Ah okay so it's not an object... Thanks

jochem_zw
Employee
Employee

it's a document extension, not an extension object

Not applicable

Ok, got it working now. Thanks.

Brian_Munz
Employee
Employee
Author

jochem_zw,

I finished a document extension which does the zoom to fit window.

http://community.qlik.com/thread/58941

Let me know if this was what you were looking for.

jochem_zw
Employee
Employee

Was just downloading it!

Thanx will see if it does what I think it needs to do!

Reg. Jochem

Brian_Munz
Employee
Employee
Author

Yeah it's not going to be exactly like the designer one by any means since I have to use web technologies to do the zooming. 

Not applicable

This is a great extension and has bugged me since using Qlikview that i couldnt center my app.

On my current project however, i needed to hide my tabrow and noticed that when i use this extension, it pops my background down a few pixels. i cant tell if its bumped down to compensate for the tabrow, or its some kind of bug related to how im using my background (background is a tiled image 1 pixel length wide stretching across page).

as soon as i remove and then apply the background it then looks the way its suppose to.

any thoughts?

Not applicable

I love this app!  One question in the Global Games app you made how did you set up the new background image on the same page?

mauro_villa
Partner - Contributor II
Partner - Contributor II

Great extension!!    Thanks Brian.

Just for info, I had to replace the entry "qvtr-tabs" with "qvtr-tabs-wrap" to align the Tabs too. I'm using the 11.20.

Thanks again Brian for sharing your work.

jacekvsp
Contributor III
Contributor III

I have implemented this extension and it works fine on desktop browsers. We have users using Good For Enterprise on iPad and dashboards with this extension were very slow. Performance was restored after we have removed this extension from the dashboard. Looks like on GfE the browser was constantly realigning objects.