Css 如何正确对齐页脚文本
Css 如何正确对齐页脚文本,css,Css,这是我的网站页脚。正如你所看到的,它没有很好地对齐。我只需要对齐文本。列表标题和子列表应该以相同的方式排列。我该怎么做?我已经使用了UL和LI因为您在UL元素上使用了display:inline,所以您只需添加vertical align:top您将需要以下CSS: * { margin:0; padding:0; } #footer { background-color: rgb(70,221, 93); height:250px; padding:4
这是我的网站页脚。正如你所看到的,它没有很好地对齐。我只需要对齐文本。列表标题和子列表应该以相同的方式排列。我该怎么做?我已经使用了UL和LI因为您在
UL
元素上使用了display:inline
,所以您只需添加vertical align:top
您将需要以下CSS:
* {
margin:0;
padding:0;
}
#footer {
background-color: rgb(70,221, 93);
height:250px;
padding:40px 0;
width:100%;
}
#footer > div {
text-align:center;
width:24%;
display:inline-block;
vertical-align:top; /* See this line its important for all the 'headers' to align properly */
}
#footer > div > span {
margin:0 0 30px 0;
display:block;
font-weight:bold;
}
a {
display:block;
color:White;
text-decoration:none;
margin-bottom:10px;
}
请看这里:
希望这有帮助 你可以发布你的html css代码吗。如果可能的话,在jsfiddle.netI为您修复-:)是的,这里是:工作,非常感谢。你是个救生员