http://preview.goodinkproductions.com/CG8F13

我已经设法使页脚遍及整个站点(与容器和AOK中的主体不同)。但是,我无法使页脚背景坚实。看来我下面有一个纯色带,但页脚内容不在该“空间”中。我只想要一个坚实的跨度页脚,其中包含内容!

的CSS
    / *页脚
    -------------------------------------------------- ------------------------------ * /

#footer {
width: 100%;
background-color:#FF8800;
}
#footer-content{
width: 950px;
height: 80px;
margin-left: auto;
margin-right: auto;
}

#footer p {
color: #878787;
font-size: 12px;
}

#footer blockquote {font-size:11px; color:#999;}

#footer a {
color: #a59b8c;
}

#footer a:hover {
color: #cab99f;
}

#footer span {
vertical-align: middle;
}

#footer h2 {
font-size: 15px;
margin: 0 0 2px;
padding: .3em 0;
line-height: 1.5;
font-family: "Lato", Arial, Helvetica, sans-serif;
font-weight: 700;
color: #ebb058;
}

.wsite-footer {  /* make sure enough space between element footer and attribution */
margin-bottom: 15px;
}


的HTML
    -------------------------------------------------- ------------------------------
    
    
    
    
    
    
    
    
        {商标}
        {菜单}
    
    
        
            
                
                    
                        
                            
                                {phone:text}
                                {social}
                                {搜索}
                            
                        
                    
                
            
            
        
        
            
        
        
            {内容}
        

</div>

</div>
<div style='padding: 20px; width:100%; text-align:center;'>{footer}</div>
</body>
<div id="footer">

   <div id="footer-content">

   </div>

</div>
</html>


结束

最佳答案

我不太了解这里发生了什么,但是您需要在body标签内添加页脚div。

</div>

</div>
<div style='padding: 20px; width:100%; text-align:center;'>{footer}</div>
<div id="footer">

   <div id="footer-content">

   </div>

</div>
</body>
</html>

关于html - #footer背景纯色不适用于容器,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25109614/

10-09 14:35