Alberto Fontana
Alberto Fontana

Reputation: 948

jQuery Mobile grids not working as expected

I've made a simple page to test jQuery Mobile grids. I just copied/pasted everything from jQuery Mobile demo website but nothing seems to work.

The blocks simply does not align properly, as you can see from this test page i've made. If (magically) you see them aligned, this is a screenshot of what i see.

What's really driving me crazy is that the same exact code works in jsfiddle!!!

<div class="ui-grid-a">
        <div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
        <div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
</div><!-- /grid-a -->

Any idea?

Upvotes: 1

Views: 835

Answers (1)

Alberto Fontana
Alberto Fontana

Reputation: 948

I found the problem!

In the examples on the jQuery Mobile website the don't use TABS, but they use spaces, which are converted as &nbsp; by the browser and make the last block go down. Therefore, by copying and pasting from their website i got this issue.

Very tricky to find

Upvotes: 4

Related Questions