Jump to content

col-xs-# for .navbar not working


Recommended Posts

<nav class="navbar navbar-default navbar-fixed-top col-xs-12">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">WebSiteName</a>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
When i shrink window, navbar comes horizontally covering the whole browser width. How to get ride of this?
Link to comment
Share on other sites

He's using a CSS framework called bootstrap which has media queries internally.


Bootstrap automatically stacks columns vertically when the window is small, this is done so that blocks don't become too thin on tiny screens. If you don't want that behavior then don't use the col-xs-12 class, set the width of the column yourself manually with CSS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...