ggcodes
ggcodes

Reputation: 2909

rails5-bootstrap-sass navbar responsiveness not working

Why is it that navbar responsiveness not working on Rails 5. I am using bootstrap-sass gem. I've already search on the internet and tried for possible solutions yet I got no luck.

Here is my /app/assets/stylesheets/application.css.scss

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 * 
 *
 */

@import "bootstrap-sprockets";
@import "bootstrap";

Any help is much appreciated!

Thanks,

Upvotes: 3

Views: 325

Answers (1)

Touqeer
Touqeer

Reputation: 654

I was having the same issue earlier. I resolved it by adding these two lines in the head of application.html.erb

<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

Upvotes: 1

Related Questions