开发者

jQuery Mobile grid space gap

I'm using jQuery Mobile layout grids with 2 columns but there's a space gap when the cell's height is different.

Example:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>jQueryMobile Demos</title>                         
        <link type="text/css" rel="stylesheet" href="jquery.mobile-1.0a4.min.css" />
        <script type="text/javascript" src="jquery-1.5.2.min.js"></script>
        <script type="text/javascript" src="jquery.mobile-1.0a4.min.js"></script>            
    </head>
    <body>        
        <div data-role="page">
            <div data-role="content">
                <div class="ui-grid-a">
                    <div class="ui-block-a"><div class="ui-bar ui-bar-c">Name</div></div>
                    <div class="ui-block-b">&l开发者_运维问答t;div class="ui-bar ui-bar-c">Diogo<br />Cardoso</div></div>             
                </div>
            </div>
        </div>  
    </body>


In the documentation (in the example) they use a inline-style tag for the height. Documentation: http://jquerymobile.com/demos/1.0a4.1/docs/content/content-grids.html

inline-style tag: style="height:120px"

Here is a working example: http://jsfiddle.net/V4uqN/5/

http://api.jquery.com/css/

Something like:

$('#element').css('height','120px');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜