Студент - Репутация: 2
- Webmoney BL:
? | Подскажите как закрепить footer внизу страницы, что бы он при растягивании сайта всегда был прижат к низу страницы. Вот код моего footera:
Развернуть текст Код HTML: <footer id="colophon" role="contentinfo" class="span12"> <div id="page-footer" class="clearfix"> <center><a href="/" style="color: #ce422b;">Мой сайт</a> © 2014</center> </div><!-- #page-footer .well .clearfix --> <div id="footer_social"> <script type="text/javascript" src="//yandex.st/share/share.js"
charset="utf-8"></script> <div class="yashare-auto-init" data-yashareL10n="ru"
data-yashareQuickServices="yaru,vkontakte,facebook,twitter,moimir" data-yashareTheme="counter"></div> </div> <div id="footer_platforms"> <!--LiveInternet counter--><script type="text/javascript"><!--
document.write("<a href='http://www.liveinternet.ru/click' "+
"target=_blank><img src='//counter.yadro.ru/hit?t17.1;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet: показано число просмотров за 24"+
" часа, посетителей за 24 часа и за сегодня' "+
"border='0' width='88' height='31'><\/a>")
//--></script><!--/LiveInternet--> </div> </footer> [свернуть] Вот css:
Развернуть текст Код HTML: html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input {
margin: 0;
padding: 0;
}
body {
background: url('../images/treeleft.png') left -358px top repeat-y, url('../images/treeright.png') right -358px top 256px repeat-y , url('../images/bg.png');
color: #1f282c;
word-wrap: break-word;
}
#colophon {
position: absolute !important;
left: 0 !important;
right: 0 !important;
background: transparent url('../images/footer.png' ) center top;
width: inherit !important;
height: 245px !important;
margin: 0 !important;
float: none !important;
}
#footer_platforms {
left: initial;
right: 64px;
}
#footer_platforms {
font-family: fontawesome;
font-size: 64px;
color: #111;
position: absolute;
bottom: 29px;
}
#page-footer {
position: absolute;
bottom: 32px;
left: 0;
right: 0;
}
#footer_social {
font-family: fontawesome;
font-size: 64px;
color: #111;
position: absolute;
left: 64px;
bottom: 28px;
} [свернуть] |