0

I am using a JQM Popup to display some data.

Inside the popup, I have several DIV's that can be set to DISPLAY: BLOCK/INLINE-BLOCK to display different ones and hide others.

The problem is they are different sizes, so when I switch from say a big one to a small one, the JQMPopup is misaligned with the rest of the page.

Anyone know of a way to get the JQMPopup to re-align?

I did notice that if I change the size of the browser, the JQMPopup adjusts to the right place.

take care, lee

Lee Loftiss
  • 2,835
  • 7
  • 40
  • 65

1 Answers1

0

Actually, you might change it by css. In my case I want it stay at the center, so i set the following css to it:

left: 50%; 
width: 75%; 
margin: 10% 0 0 -37.5%;
Horst
  • 1,454
  • 12
  • 19
  • Thanks. That idea crossed my mind. However, it requires a fixed width and the width needs to be dynamic. One thing that caught my attention was when I resize the browser, the window adjusts. Is there a way to trick a CSS object into doing this? – Lee Loftiss Feb 19 '13 at 07:52
  • you can bind a function to do this on window resize: http://stackoverflow.com/questions/641857/javascript-window-resize-event or use media query for css: https://developer.mozilla.org/en-US/docs/CSS/Media_queries – Horst Feb 19 '13 at 08:14
  • I think you misunderstood what I was getting at. When I resize the browser window, the elements automatically resize and re-align. I am wondering if there is a way to programically 'trick' the element into thinking the browser had been resized. – Lee Loftiss Feb 19 '13 at 08:18