0

我的 HTML5/CSS 呈现如下:http: //imgur.com/0rixh

使用以下代码:

                <li>
                    <div class="name">Booger Jet.zip</div>
                    <progress max="100" value="60"></progress>
                    <div class="control"></div>
                    <div class="status">12 MB / 21 MB   240 kB/s</status>
                </li>

#uploads li progress {
    width: 317px;
    margin-bottom: 4px;
}

#uploads li .control {
    width: 14px;
    height: 14px;
    display: inline-block;
    opacity: 0.6;
    background-image: url('../img/stop_button.png');
}

如何垂直对齐它们?我有哪些选择?谢谢!

4

2 回答 2

1

尝试一下

#uploads li progress {
    width: 317px;
    margin-bottom: 4px;
    margin-top:1px; /* change it if you need more top sapce*/
}
#uploads li .control {
        width: 14px;
        height: 14px;
        display: inline-block;
        vertical-align:top;
        opacity: 0.6;
        background-image: url('../img/stop_button.png');
    }
于 2012-11-10T17:41:04.723 回答
0

您可以为此使用vertical-align:middle

#uploads li .control, #uploads li progress{
 display:inline-block;
 vertical-align:middle;
}
于 2012-11-10T17:10:30.283 回答