Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 垂直中心绝对定位元件_Css - Fatal编程技术网

Css 垂直中心绝对定位元件

Css 垂直中心绝对定位元件,css,Css,我正试图将桌子垂直居中放置在li内。我该怎么做?以下是我到目前为止的情况: <ul class="right_content> <li> <div class="content"> <table class="table_class left_content"> <tbody> <tr>

我正试图将桌子垂直居中放置在li内。我该怎么做?以下是我到目前为止的情况:

<ul class="right_content>
    <li>
        <div class="content">
            <table class="table_class left_content">
                <tbody>
                    <tr>
                        <td style="padding:5px;>
                            <div class="content"> Stuff </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div>Some Stuff</div>
    </li>
    ...
</ul>


.right_content {
    position:fixed;
    right:0;
    top:55px;
    width:34px;
    list-style:none;
    margin:0;
    padding:0;
    z-index:1;
}

.right_content li {
    text-align:center;
    font-size:20px;
    position:relative;
    margin:0;
    padding:10px 0;
    line-height:20px;
    display:list-item;
    color:#999;
}

.content {
    position:relative;
    width:100%;
    height:100%;
}

.table_class {
    color:#fff;
    font-size:12px;
    background-color:#333;
    padding:10px;
}

.left_content {
    position:absolute;
    top:0;
    bottom:0;
    right:35px;
}

它不是垂直居中吗?我想是的。我不确定你想完成什么,但也许你可以看看这把小提琴-