我一直在努力重新创建我在90年代创建的父亲网站(呃),我一直无法让文本适合div内部并水平对齐.我需要将文本放在一起,以便它们适合div.这是
jsfiddle中页面的代码
示例HTML
Home
Inside Staff
Our Mission
示例CSS
div img#header{
width: 50%;
height: 15%;
margin-left: 125px;
margin-right: auto;
}center input#search{
width: 300px;
height: 45px;
border: solid 1px black;
margin-top: 55px;
font-size: 25px;
}center button#searchbutt{
border: solid 1px black;
width: 65px;
height: 30px;
}#searchbutt:hover{
color: #FFF;
background-color: #000;
}#searchbutt{
background-color: #FFF;
color: #000;
}#links{
height: 40px;
width: 100%;
text-align: center;
line-height: 40px;
}.home{
width: 80px;
text-align: center;
height: 40px;
background-color: white;
color: black;
padding-left: auto;
padding-right: auto;
display: inline-block;
border: solid 1px black;
vertical-align: middle;
}.DL{
width: 95;
text-decoration: none;
text-align: center;
height: 40px;
background-color: white;
color: black;
padding-left: auto;
padding-right: auto;
display: inline-block;
border: solid 1px black;
}.home a{
text-decoration: none;
color: gray;
}.DL a{
text-decoration: none;
color: gray;
}div center a#DLbutt{
border: solid 1px black;
width: 100px;
height: 50px;
background-color: black;
}div center a#DLbutt{
text-decoration: none;
color: gray;
}#download{
padding-top: 30px;
}html{
background-image: url("watermark.gif");
}.home a span{
position:absolute;
width:100%;
height:100%;
top:0;
left: 0;
display: inline-block;
vertical-align: middle;
line-height: normal;
}
我需要“我们的使命部分”在同一个div中.