Css 垂直中心绝对定位元件
我正试图将桌子垂直居中放置在li内。我该怎么做?以下是我到目前为止的情况:Css 垂直中心绝对定位元件,css,Css,我正试图将桌子垂直居中放置在li内。我该怎么做?以下是我到目前为止的情况: <ul class="right_content> <li> <div class="content"> <table class="table_class left_content"> <tbody> <tr>
<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;
}
它不是垂直居中吗?我想是的。我不确定你想完成什么,但也许你可以看看这把小提琴-