Vicent Cortés
Posts: 0
Joined: Sat Oct 12, 2013 5:09 pm

Vertically Center the text and image in a list of buttons

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!!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Vertically Center the text and image in a list of buttons

Hi Vicent,

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Vertically Center the text and image in a list of buttons

Vicent,

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Vertically Center the text and image in a list of buttons

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

Vicent Cortés
Posts: 0
Joined: Sat Oct 12, 2013 5:09 pm

Vertically Center the text and image in a list of buttons

Thank you!! And code for image??

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Vertically Center the text and image in a list of buttons

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.

Return to “Issues”