div展示html文本,html – 使文本适合div
我一直在努力重新創建我在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中.
總結
以上是生活随笔為你收集整理的div展示html文本,html – 使文本适合div的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言判断化学方程式,下列是某同学写的六
- 下一篇: jmeter五种参数化方式之CSV Da