2017-04-21 50 views
0

嘿我的頁腳底部的頁腳欄不會對齊文本。頁腳欄無法對齊文本

這是我的html:

<div class="row"> 
    <div id="footer"> 
    <h3>Contact</h3> 
    <h3>Computerbasen</h3> 
    <h3>Info</h3> 
    </div> 
    </div> 

這是我的CSS:

#footer { 
    background-color: #FF7633; 
    width: 100%; 
    height: 50px; 
    border-radius: 5px; 
    padding-top: 10px; 
    text-align:center; 
    position: fixed; 
    bottom: 0; 
    } 

Click here and see the image of the footer bar

+0

據水平雖然對齊。你想讓它垂直對齊嗎?請詳細說明你的問題。 – rotgers

回答

1

如果你的意思是水平排列,使用這樣的規則:

#footer h3 { 
text-align:center; 
} 

(該h3元件具有100%的寬度和左對齊默認情況下)

0

嘗試

#footer { 
    height: 150px; 
} 

大部分的文本沒有顯示出來,因爲高度太小。

1

你知道有在HTML中的頁腳標籤,試試這個:

<footer> 
<h3>Contact</h3> 
<h3>Computerbasen</h3> 
<h3>Info</h3> 
</footer> 

footer { 
    background-color: #FF7633; 
    width: 100%; 
    height: 50%; 
    border-radius: 5px; 
    padding-top: 10px; 
    text-align:center; 
    bottom: 0; 
}