我用来创建页面菜单栏的样式表有问题。每当页面没有上一页或下一页时,单元格为空,CSS 仅应用背景图像。每当我尝试实现此解决方案时,构成菜单栏的单元格都会四处移动,并且所有内容都不再对齐。我需要帮助来尝试弄清楚如何解决这个问题。
以下是已应用于图像中显示为灰色后退按钮的空单元格的类。
td.menu-back-disabled {
background-image: url('back_first.png');
display: block;
border-style: none;
border-width: 0px;
padding: 0px;
height: 34px;
width: 85px;
}
li.menu-bar {
list-style-type: none;
background-image: url('top.png');
background-repeat: repeat-x;
border-style: none;
border-width: 0px;
padding: 0px;
height: 34px;
width: 100%;
}
这是菜单栏的 html:
<table class="menu">
<br>
<tr>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=environment" class="menu-home">
</a>
</td>
<td class="menu-edit-selected">
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=upload&number=1&filter=1" class="menu-upload">
</a>
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=comments" class="menu-comments">
</a>
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=log&number=1" class="menu-log">
</a>
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=stats&number=1" class="menu-stats">
</a>
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=settings" class="menu-settings">
</a>
</td>
<td class="menu-bar">
</td>
<td class="menu-bar-right">
</td>
<td class="menu-back-disabled">
</td>
<td>
<a href="https://peter-larsens-macbook.local:8081/cgi-bin/display?page=edit&number=2&filter=1" class="menu-next">
</a>
</td>
</tr>
</table>