1

我正在尝试button在文本header中添加一个。collapsible list但我希望将按钮放置在rightmost side. 当我尝试这样做时,文本和按钮未对齐。

编辑:带有值的按钮与"setting"文本不对齐"filtered list"

见:http: //jsfiddle.net/puX9w/

我该如何解决这个问题?

4

1 回答 1

4

工作示例:http: //jsfiddle.net/Gajotres/kNDf4/

HTML:

<body>
    <div data-role="page">
        <div data-role="collapsible-set" data-theme="b" data-content-theme="d">
            <div data-role="collapsible">
                <h3 data-position="inline">Filtered list             
                    <span style="float:right;" class="button-span"> <input type='button' data-theme='b'  value='Settings' data-mini='true' data-inline='true' data-icon='gear' data-icon-pos='top' id="show-content"/>
                    </span>
                </h3>
                <ul data-role="listview" data-filter="true" data-filter-theme="c" data-divider-theme="d">
                    <li><a href="#">Adam Kinkaid</a></li>
                    <li><a href="#">Alex Wickerham</a></li>
                    <li><a href="#">Avery Johnson</a></li>
                    <li><a href="#">Bob Cabot</a></li>
                    <li><a href="#">Caleb Booth</a></li>
                </ul> 
            </div> 
        </div>
    </div>
</body>

CSS:

.button-span {
    position: absolute;
    right: 0;
    margin-top: -7px !important;
}

.ui-btn-text {
    display: block; 
}
于 2013-05-31T10:51:31.900 回答