文本填充与包装不同

时间:2014-02-05 21:07:56

标签: css

我有一个CSS问题让我有点疯狂。

我在单页菜单中使用两个不同的CSS定义来处理大/小文本。小文本应与较大的文本对接。

当较大的文本换行时,较小的文本位于正确的位置。当较大的文本没有换行时,会出现间隙。

我尝试了两种阻止,没有区别。当前的CSS定义和菜单位于wptest.SiliconStrat.com的左侧页面。

.hometopic {
font-family: sans-serif;
font-size: 1.1em;
font-weight: bold;
margin-top:4;
margin-bottom:0;
text-decoration: none;
line-height:100%;
display: inline-block;
}

a.hometopic:hover {
color: #B3535E;
}
.hometopicsub {
font-family: sans-serif;
font-size: 0.9em;
margin-top: 0;
line-height: 0.9;
display: inline-block;
}

1 个答案:

答案 0 :(得分:0)

尝试在.hometopicsub之前移除BR,使用float:left(hometopicsub)和padding-bottom(hometopic)

.hometopic {
font-family: sans-serif;
font-size: 1.1em;
font-weight: bold;
margin-top:4;
margin-bottom:0;
text-decoration: none;
line-height:100%;
display: inline-block;
padding-bottom: 8px;
}
a.hometopic:hover {
color: #B3535E;
}
.hometopicsub {
font-family: sans-serif;
font-size: 0.9em;
margin-top: 0;
line-height: 0.9;
display: inline-block;
float: left;
}
相关问题