Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery blockui positioning

Tags:

jquery

blockui

I'm using blockui to throw some forms up on my site but for some reason the blockui element is positioned about 20-30 pixels from the bottom of the screen. I tried, per the docs (jquery blockui options for v2) to reposition it using this code:

 $.blockUI({css: {top : '10px'}});

But that just yawned at me in a universe mocking kind of way and did nothing. The default, again, per the docs, is top : 40%. I don't want to wipe out all the blockui css, just reset the top positioning.

like image 965
PruitIgoe Avatar asked Jan 31 '11 17:01

PruitIgoe


1 Answers

I use this and the Load Message is positioned to the top right hand corner. Just play with the css to suit.

Hope this helps.

Rob

$.blockUI({
         message: '<img src="_assets/images/loading.gif" /><span style="margin-left:5px; font-family:arial;">Loading...</span>',
         fadeIn: 700,
         fadeOut: 700,
         timeout: 1000,
         showOverlay: false,
         centerY: false,
         css: {
             width: '150px',
             top: '10px',
             left: '',
             right: '10px',
             border: 'none',
             padding: '5px'
         }
     }); 
like image 59
Rob Avatar answered Nov 14 '22 23:11

Rob