问题描述:

I am building a mobile app with jquery mobile. I am trying to do something like this.

You can see what I have so far over here.

Like you can see, some image are looking good. But some images also are lined up to the top of the listItem. So what I want to do is that when an image is not big enough, it nicely centers itself in the middle of the listview thumbnail.

Now my code,this is what I have in my HTML

<li data-icon="false">

<a href="~PROBE(236)~">

<img src="images/company_logos/~ITEM.LOGO_IMAGE~" class="ui-li-thumb" />

<h3>~ITEM.NAME~</h3>

</a>

</li>

And this is my CSS

.ui-li-thumb, .ui-listview .ui-li-icon { position: absolute; left: 0px; top: -16px; max-height: 50px; max-width: 50px; }

.ui-listview .ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; }

.ui-li-thumb, .ui-listview .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; padding-bottom:5px; padding-left:5px; padding-top:5px;}

Could somebody help ?

Kind Regards.

相关阅读:
Top