Page 1 of 1

Vertically Center the text and image in a list of buttons

Posted: Mon Nov 04, 2013 5:45 pm
by Vicent Cortés

Hello,

I have inserted a list of buttons with custom images. I've done the buttons list wider have vertically, but when I do this, the text and images are at the top of each button. How can I Center each image and text vertically?
I introduce this code:

.ui-page .ui-li .ui-li-thumb, .ui-page .ui-li .ui-li-icon {
max-height: 38px;
max-width: 40x;
}
.ui-page .ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-page .ui-li-static.ui-li-has-thumb {
min-height: 40px;
}
.ui-page .ui-li-has-thumb .ui-link-inherit {
padding: 0px 60px !important;
}
.ui-page .ui-li-has-thumb .ui-link-inherit .ui-li-heading {
margin-top: 5px !important;
}

A greeting!!


Vertically Center the text and image in a list of buttons

Posted: Mon Nov 04, 2013 6:20 pm
by Kateryna Grynko

Hi Vicent,

Did you set images for mobilelist as icons or thumbnails? Could you please post a public link?


Vertically Center the text and image in a list of buttons

Posted: Mon Nov 04, 2013 6:49 pm
by Vicent Cortés

hi, i have in my image: thumbnails.

http://appery.io/app/mobile-frame?src...


Vertically Center the text and image in a list of buttons

Posted: Mon Nov 04, 2013 7:26 pm
by Kateryna Grynko

Vicent,

Please tick 'Public' in Test menu as we cannot access your application.


Vertically Center the text and image in a list of buttons

Posted: Wed Nov 06, 2013 2:54 pm
by Vicent Cortés

Vertically Center the text and image in a list of buttons

Posted: Wed Nov 06, 2013 5:30 pm
by Kateryna Grynko

Hi Vicent,

Try the following:pre.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit{
display: table-cell;
height:40px;
vertical-align: middle;
}/pre


Vertically Center the text and image in a list of buttons

Posted: Thu Nov 07, 2013 6:03 pm
by Vicent Cortés

Thank you!! And code for image??


Vertically Center the text and image in a list of buttons

Posted: Thu Nov 07, 2013 7:17 pm
by Kateryna Grynko

Vicent,

Here you are:precode.ui-listview > .ui-li .ui-li-thumb{
top: 50%;
position: absolute;
margin-top: -20px;
}/code/preWhere 20px is a half of Image height.