Oleg
Oleg

Reputation: 381

How to place the icons,pics in list in the right side in Jquerymobile

I am using jquerymobile, and trying to show a list, the default place for the icons or other pics is left side! how can i change it to right?

<ul data-role="listview" data-theme="a">
            <li>
                <p><strong>text</strong></p>
                <p class="ui-li-aside"><img src="images/album-bb.jpg"/></p>
            </li>

Upvotes: 2

Views: 3415

Answers (1)

Phill Pafford
Phill Pafford

Reputation: 85358

Does this work for you?

CSS ( new class )

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

HTML ( apply the new class to the image )

<ul data-role="listview" data-theme="a">
    <li>
         <h3>Title</h3>
        <p><strong>Albums</strong></p>
        <p class="ui-li-aside">
            <img src="http://a.vimeocdn.com/images_v6/icon_albums_md.png" class="ui-li-icon-right"/>
        </p>
    </li>
</ul>
<br />
<br />
<ul data-role="listview" data-theme="a">
    <li>
        <a>
            <h3>Title</h3>
            <p><strong>is this what you wanted?</strong></p>
            <p>Look Ma, more text</p>
            <p class="ui-li-aside">
                <img src="http://a.vimeocdn.com/images_v6/icon_albums_md.png" class="ui-li-icon-right"/>
            </p>
        </a>
    </li>
</ul>

Upvotes: 1

Related Questions