2013-08-01 177 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