PeterKrogh
Posts: 0
Joined: Fri Feb 01, 2013 12:17 am

Centering a control?

Is this still supported in the latest version of Tiggzi?

I understand that this snippet should center the image "mobileimage24" on page load:

$('.mobileimage_24').css('margin', 'auto');
$('.mobileimage_24').css('align', 'center');

...but I'm not sure where to put that code. I've tried adding in 'Set HTML attribute,' 'Run JavaScript,' and 'Set Property' from the attached drop down but nothing seems to work. Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Centering a control?

On page load.

http://docs.tiggzi.com/documentation/...

Tiggzi is an app builder. You can do anything that's supported by the browser.

PeterKrogh
Posts: 0
Joined: Fri Feb 01, 2013 12:17 am

Centering a control?

Max,
I understand this happens on page load. If you look at my image above, you'll see I have 'Load' already selected. I do not know which 'Select Action' item to choose within which I will put the .css strings.
Thank you,
/Peter

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Centering a control?

Sorry, the action is Run JavaScript.

John Hajewski
Posts: 0
Joined: Wed Feb 13, 2013 1:16 am

Centering a control?

I tried this code method exactly and my image is still left justified. My image is mobileimage_6...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Centering a control?

Hello! This code should work:

Tiggzi('mobileimage_6').parent().css('margin', 'auto');
Tiggzi('mobileimage_6').parent().css('align', 'center');

PeterKrogh
Posts: 0
Joined: Fri Feb 01, 2013 12:17 am

Centering a control?

We were never able to get inline statements to work. We had to create a custom CSS file, drop it in the 'CSS' directory, then define the images we wanted centered there. Make sure you use the _div name or it won't work.

E.g.:

div.mobileimagef_6_div {
text-align: center;
width: 100%;
}

Riaan Bezuidenhout
Posts: 0
Joined: Tue Feb 19, 2013 9:33 am

Centering a control?

Hi After recent update update below script not working anymore

Tiggzi('mobileimage_64').css('margin', 'auto');
Tiggzi('mobileimage_64').css('align', 'center');

http://project.tiggzi.com/mobile-fram...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Centering a control?

Hello! This post should help https://getsatisfaction.com/tiggzi/to...

Riaan Bezuidenhout
Posts: 0
Joined: Tue Feb 19, 2013 9:33 am

Centering a control?

Thanx worked

Return to “Issues”