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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...