2013-08-01 108 views
0

我有一個demo。 爲什麼列表項目溢出白色內容區域,我該如何解決它?內容溢出內容區域

body { 
    line-height: 1; 
    background:#7D93BD; 
    font-size: 22px; 
} 
#content { 
    width:80%; 
    height:auto; 
    margin-left:auto; 
    margin-right:auto; 
    padding: 10px 20px 30px 20px; 
    background-color:#F8F8F8; 
    color: #333333; 
    font-family: Helvetica, Arial, sans-serif; 
} 
    #profileInfo { 
    position: relative; 
    top: 100px; 
} 
#profileInfo li { 
    list-style-type: none; 
    line-height: 1.4; 
} 
#profile_info_title { 
    font-weight: bold; 
} 

回答

1

如果需要#profileInfo由100像素推下來,然後用margin-top,而不是top

#profileInfo { 
    margin-top: 100px; 
    position: relative; 
} 
5

您需要從#profileInfo ul中刪除top:100px - 它會將該內容向下推動100px。

+0

如果我把上面:100px的就意味着它在那裏。只要我的代表點是125我會按下投票爲您的答案:) – Tahtakafa

+1

我不知道你的意思你的評論 - 我只是解決溢出問題。無論如何,我很高興你找到了答案,用margin-top:100px代替top:100px。 :) – Michelle