Twitter Bootstrap navbar-fixed-bottom custom height

扶醉桌前 提交于 2019-12-12 10:36:56

问题


I was using twitter bootstrap for interest. And these days I was trying to make custom navbar. I want to display some information on bottom navbar making it as navbar-fixed-bottom. But I can't customize it's height. The default height is not enough for me.

If anyone has faced this problem and has solution, please, share. Thank you.


回答1:


By the way... You can customize your Twitter Bootstrap here: http://twitter.github.com/bootstrap/customize.html

Just change @navbarHeight.

But this will change navbar-fixed-top's height too...


EDIT: The website has changed, the new URL to customize Bootstrap is http://getbootstrap.com/customize/




回答2:


The navbar should match the size of the content (as long as the content isn't outside the document flow). You will need to increase the padding of the body so that the content doesn't disappear behind the bottom navbar though. If you're using the responsive bootstrap add the following rule to your css and replace the ?? with the height of your bottom navbar:

@media (min-width: 980px){
    body {
        padding-bottom: ??px;
    }
}

For non-responsive layouts, declare it without the media query:

body {
    padding-bottom: ??px;
}


来源:https://stackoverflow.com/questions/13576866/twitter-bootstrap-navbar-fixed-bottom-custom-height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!