JR Galia
JR Galia

Reputation: 17269

Image in JQueryMobile

I want to have a 2-column layout in a JQM page. The first column will be an image, and the second column will be some text.

<div data-role="content">
    <div class="ui-grid-a">
        <img class="ui-block-a" src="/image/no-picture.jpg"/>
        <div class="ui-block-b">
            <h1>Some Text Here</h1>         
        </div>
    </div>
</div>

I tried to set max-width, it works in a browser, but didn't work in android webview. What is the best way to do this?

Thanks

Upvotes: 0

Views: 92

Answers (1)

Gajotres
Gajotres

Reputation: 57309

This is a working example. I have tested it on Galaxy S3 andr. 4.1

  <div class="ui-grid-a">
    <div class="ui-block-a">
      <img src="http://www.index.hr/thumbnail.ashx?path=images2/europskimljekari_AFP26112012.jpg&width=325&height=197"/>
    </div>
    <div class="ui-block-b">
      <h1>Some Text Here</h1>
    </div>
  </div>

Give me a comment if you wanted something else. Also dont forget to use this in your header:

<meta content="width=device-width, minimum-scale=1, maximum-scale=2" name="viewport"> 

Upvotes: 1

Related Questions