I'm trying to center the nav-items text in the collapsable menu ,
but for some reason when I select .nav-item in css , with text-align
center , it doesn't work ,
what am I doing wrong ? I've also tried doing text-align on .navbar-nav but it still doesn't center the text ?
#media screen and (max-width: 767px) {
.nav-item-logout {
position: relative;
top: 20px;
right: 0;
font-family: 'Saira', sans-serif;
font-size: 20px;
color: rgb(223, 250, 250);
padding: 5px;
width: 25%;
}
.menu {
background-color: transparent;
border: none;
cursor: pointer;
display: block;
padding: 0;
float: right;
top: 10px;
position: relative;
}
}
<nav class="navbar navbar-expand-md navbar-dark bg-dark large_navbar">
<div class="container1">
<a class="navbar-brand ml-4 mr-4" href="#"><b>Future Sounds</b></a>
<button class="menu" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" onclick="this.classList.toggle('opened');this.setAttribute('aria-expanded', this.classList.contains('opened'))" aria-label="Toggle navigation">
<svg width="50" height="50" viewBox="0 0 100 100">
<path class="line line1" d="M 20,29.000046 H 80.000231 C 80.000231,29.000046 94.498839,28.817352 94.532987,66.711331 94.543142,77.980673 90.966081,81.670246 85.259173,81.668997 79.552261,81.667751 75.000211,74.999942 75.000211,74.999942 L 25.000021,25.000058" />
<path class="line line2" d="M 20,50 H 80" />
<path class="line line3" d="M 20,70.999954 H 80.000231 C 80.000231,70.999954 94.498839,71.182648 94.532987,33.288669 94.543142,22.019327 90.966081,18.329754 85.259173,18.331003 79.552261,18.332249 75.000211,25.000058 75.000211,25.000058 L 25.000021,74.999942" />
</svg>
</button>
<div class="collapse navbar-collapse menu_nav" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item" href="{% url 'home' %}">HOME</a>
<a class="nav-item" href="{% url 'users_list' %}">ADD NEW FRIENDS</a>
{% if user.is_authenticated %}
<a class="nav-item" href="{% url 'friend_list' %}">FRIENDS</a>
<a class="nav-item" href="{% url 'my_profile' %}">PROFILE</a>
<a class="nav-item" href="{% url 'post-create' %}">CREATE POST</a>
<a class="nav-item-logout auth_buttons btn btn-danger" href="{% url 'logout' %}">LOGOUT</a>
{% else %}
<a class="nav-item auth_buttons btn btn-success text-light" href="{% url 'login' %}">LOGIN</a>
<a class="nav-item auth_buttons btn btn-info text-light" href="{% url 'register' %} ">REGISTER</a>
{% endif %}
{% block searchform %}{% endblock searchform %}
</div>
</div>
</div>
</nav>
<div class="container">
{% block content %}{% endblock content %}
</div>
<footer class="page-footer font-small black">
<div class="footer-copyright text-center py-3">Future Sounds © 2020
<br><small class="text-muted">All rights reserved!</small>
</div>
</footer>
What about extend the container1 on the entire page (<div class="container1 w-100">) and then center your menu_nav (<div class="collapse navbar-collapse menu_nav w-100 d-flex justify-content-center" id="navbarNavAltMarkup">)?
I found the problem , it was another .nav-item command I had in css , where I had set the width to 25%, I changed this to 100% and now I'm able to center the nav-item links
Related
I'm struggling to move my search bar to far right of my navbar. I have reviewed other questions but not fixes seem to work for me.
Some help identifying why would be great.
navbar html
<nav class="navbar navbar-expand-lg fixed-top">
<div class="nav-container">
<div class="navbar-nav">
<a class="nav-link" aria-current="page" href="{% url 'home' %}"
>Home</a
>
<a class="nav-link" href="{% url 'gallery' %}">Gallery</a>
<a class="navbar-name" href="{% url 'home' %}">MARTIN HENSON PHOTOGRAPHY</a>
<a class="nav-link" href="{% url 'blog' %}">Blog</a>
<a class="nav-link" id="contact-nav-link" href="{% url 'contact' %}">Contact</a>
<form class="d-flex" method="POST" action="{% url 'searchblogs' %}">
{% csrf_token %}
<i class="fa fa-search"></i>
<input type="text" class="form-control rounded-0" placeholder="Search keyword" name="searched">
<button id="search-button" class="btn btn-primary-outline rounded-0">Search</button>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</div>
</nav>
navbar css
.navbar {
background: black;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5) !important;
text-align: center;
width: 100%;
}
.nav-container {
display: inline-block;
margin: 0 auto;
}
.navbar .navbar-nav {
padding: 50px;
}
.navbar-name {
text-decoration: none;
color: white;
margin-left: 50px;
margin-right: 50px;
}
I don't see any styles for navbar-nav. It is a problem, because in row are just inline elements a that's why is form under it. You need to add d-flex.
<div class="navbar-nav d-flex">
and use something for justify elements for spacings see https://css-tricks.com/snippets/css/a-guide-to-flexbox/.
That's an easy fix. Just add a float right CSS to your search bar:
.navbar {
background: black;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5) !important;
text-align: center;
width: 100%;
}
.nav-container {
display: inline-block;
margin: 0 auto;
}
.navbar .navbar-nav {
padding: 50px;
}
.navbar-name {
text-decoration: none;
color: white;
margin-left: 50px;
margin-right: 50px;
}
.d-flex {
float:right;
}
<nav class="navbar navbar-expand-lg fixed-top">
<div class="nav-container">
<div class="navbar-nav">
<a class="nav-link" aria-current="page" href="{% url 'home' %}"
>Home</a
>
<a class="nav-link" href="{% url 'gallery' %}">Gallery</a>
<a class="navbar-name" href="{% url 'home' %}">MARTIN HENSON PHOTOGRAPHY</a>
<a class="nav-link" href="{% url 'blog' %}">Blog</a>
<a class="nav-link" id="contact-nav-link" href="{% url 'contact' %}">Contact</a>
<form class="d-flex" method="POST" action="{% url 'searchblogs' %}">
{% csrf_token %}
<i class="fa fa-search"></i>
<input type="text" class="form-control rounded-0" placeholder="Search keyword" name="searched">
<button id="search-button" class="btn btn-primary-outline rounded-0">Search</button>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js"></script>
</div>
</nav>
**If you run the snippet, make sure you click "full page" to see the effect.
I tried to add navigation bar to my djagno site but it gives a error like "Reverse for 'about' not found. 'about' is not a valid view function or pattern name." I use this this answer to make this navigation bar [stack over flow answer][1] Please give me a another option to do this or help to debug this code .anyway here is my base.html full file
<!DOCTYPE html>
<html>
<head>
<title>Django Central</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto:400,700"
rel="stylesheet">
<meta name="google" content="notranslate" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"
/>
</head>
<body>
...
{% block nav %}
<ul id="nav">
<li>{% block nav-home %}Home{% endblock %}</li>
<li>{% block nav-about %}About{% endblock %}</li>
<li>{% block nav-contact %}Contact{% endblock %}</li>
</ul>
{% endblock %}
...
<style>
body {
font-family: "Roboto", sans-serif;
font-size: 17px;
background-color: #fdfdfd;
}
.shadow{
box-shadow: 0 4px 2px -2px rgba(0,0,0,0.1);
}
.btn-danger {
color: #fff;
background-color: #f00000;
border-color: #dc281e;
}
.masthead {
background:#3398E1;
height: auto;
padding-bottom: 15px;
box-shadow: 0 16px 48px #E3E7EB;
padding-top: 10px;
}
</style>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light shadow" id="mainNav">
<div class="container-fluid">
<a class="navbar-brand" href="{% url 'home' %}" >Django central</a>
<button
class="navbar-toggler navbar-toggler-right"
type="button"
data-toggle="collapse"
data-target="#navbarResponsive"
aria-controls="navbarResponsive"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item text-black">
<a
class="nav-link text-black font-weight-bold"
href="#"
>About</a
>
</li>
<li class="nav-item text-black">
<a
class="nav-link text-black font-weight-bold"
href="#"
>Policy</a
>
</li>
<li class="nav-item text-black">
<a
class="nav-link text-black font-weight-bold"
href="#"
>Contact</a
>
</li>
</ul>
</div>
</div>
</div>
</nav>
{% block content %}
<!-- Content Goes here -->
{% endblock content %}
<!-- Footer -->
<footer class="py-3 bg-grey">
<p class="m-0 text-dark text-center ">Copyright © Django Central</p>
</footer>
</body>
</html>
Thanks,
Dinindu
Are you sure you have the name="about" parameter in your urlpattern?
that should look something like this
urlpatterns = [
path('about', views.about_view, name='about'),
]
Or if you are using CBVs
urlpatterns = [
path('about', views.AboutView.as_view(), name='about'),
]
In navbar page you have reffered to urlpatterns named 'home','about','contact'
<li>{% block nav-home %}Home{% endblock %}</li>
<li>{% block nav-about %}About{% endblock %}</li>
<li>{% block nav-contact %}Contact{% endblock %}</li>
Make sure you have a named url routes in your urlpatterns i.e:
path('about', views.aboutview, name='about'),
for all of these also declare corresponding views for all of them in your views.py file.
I have the following navbar, which works pretty well with my screen (1300 pixels wide by 700 high):
When the viewport is smaller, the elements in the navbar go crazy:
I've found that switching between any of the typical bootstrap classes just cause more problems with alignment and sizing.
I tried to use this media query in my CSS but it did nothing at all:
#media only screen and (max-width: 700px) {
.navbar .app-badge {
display: block !important;
}
}
I've tried a bunch of ways to adjust the bootstrap classes or use a media query. Nothing works. I need help figuring out how to make the navbar collapse on smaller viewports.
Here's my HTML:
<nav class="navbar navbar-expand-sm navbar-spur
{% if not current_user.admin %}navbar-spur-user {% else %} navbar-spur-admin {% endif %}">
<div class="border rounded border-1 border-white pt-1 pl-1 even-height ml-n1 app-badge">
<a class="navbar-nav mr-auto text-center p-1" href="https://www.spur.community/holiday-cheer-drive">
<div class="text-center ml-n1 mt-n1">
<div class="stacked">
<img src="/static/logos/logo-spur-main.png">
</div>
<div class="stacked">
<span class="text-spur-ribbon m-1"><small><b>SPUR</b></small></span>
</div>
</div>
</a>
</div>
<div class="border rounded border-1 border-white pt-1 pl-1 ml-3 even-height app-badge">
<a class="navbar-brand p-0" href="/" title="Home">
<div class="parallel">
<img src="/static/logos/logo-spur-white.png">
</div>
<div class="parallel">
<span class="text-spur-red">
<h1>
<em>
<b>SPUR</b>
</em>
</h1>
</span>
</div>
<div class="ml-1 parallel">
<div class="mt-n2 stacked">
<small><span class="text-spur-green"><em>Holiday</em></span></small>
</div>
<div class="mt-n3 stacked">
<small><span class="text-spur-green"><em>Cheer</em></span></small>
</div>
<div class="mt-n3 stacked">
<small><span class="text-spur-green"><em>Drive</em></span></small>
</div>
</div>
{% if current_user.admin %}
<div class="mt-2 parallel">
<span class="text-spur-ribbon mt-2 ml-2"><em>Admin</em></span>
</div>
{% endif %}
</a>
</div>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
{% for url, route, label in nav_main %}
<li class="nav-item">
<a class="nav-link {{ 'active' if active_page==route }}" href="{{ url }}">{{ label }}</a>
</li>
{% endfor %}
</div>
{% if current_user.admin %}
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle {{ 'active' if active_page in admin_labels }}" data-toggle="dropdown"
href="" id="adminDropdown" aria-haspopup="true" aria-expanded="false">Admin</a>
<ul class="dropdown-menu" aria-labelledby="adminDropdown">
{% for url, route, label in nav_admin_dropdown_top %}
<li>{{ label }}</li>
{% endfor %}
<div class="dropdown-divider"></div>
{% for url, route, label in nav_admin_dropdown_bottom %}
<li>{{ label }}</li>
{% endfor %}
</ul>
</li>
</div>
{% endif %}
{% if current_user.is_authenticated and nav_logged_in %}
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
{% for url, route, label in nav_logged_in %}
<li class="nav-item">
<a class="nav-link {{ 'active' if active_page==route }}" href="{{ url }}">{{ label }}</a>
</li>
{% endfor %}
</div>
{% endif %}
</ul>
<ul class="navbar-nav m1-auto">
{% if current_user.is_anonymous %}
<!-- e.g., if NOT current_user.is_authenticated -->
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
{% for url, route, label in nav_anon %}
<li class="nav-item">
<a class="nav-link {{ 'active' if active_page==route }}" href="{{ url }}">{{ label }}</a>
</li>
{% endfor %}
</div>
{% elif current_user.is_authenticated %}
{% if nav_right %}
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
{% for url, route, label in nav_right %}
<li class="nav-item">
<a class="nav-link {{ 'active' if active_page==route }}" href="{{ url }}">{{ label }}</a>
</li>
{% endfor %}
</div>
{% endif %}
<div class="navbar-nav border rounded border-1 border-white ml-3 pt-2 pb-2 even-height app-badge">
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.logout') }}">Log Out</a>
</li>
</div>
{% endif %}
</ul>
</nav>
And my CSS (if you noticed the navbar-spur-admin class, it's the same as navbar-spur-user but with different colors):
/* NAVBAR */
/* NAVBAR */
/* NAVBAR */
/* BASE NAVBAR */
.navbar-spur, .navbar-spur .navbar-brand .navbar-nav {
background-image: none;
background-repeat: no-repeat;
}
.navbar-spur .navbar-brand .parallel img {
max-width: 2.5em;
}
.navbar-spur div a img {
max-width: 1.5em;
}
.navbar-spur .even-height {
height: 3.7em;
}
.navbar-spur .navbar-brand small {
font-size: 0.7em;
}
.navbar-spur a {
text-decoration: none;
}
.navbar-spur .navbar-brand .parallel, .navbar-spur .navbar-nav .parallel {
display: inline-block;
text-align: left;
vertical-align: top;
}
.navbar-spur .navbar-brand .stacked, .navbar-spur .navbar-nav .stacked {
display: block;
}
/* USER NAVBAR */
.navbar-spur-user, .navbar-spur-user .navbar-brand .navbar-nav {
background-color: #003274 !important;
}
.navbar-spur-user .app-badge {
background-color: #002658 !important;
}
.navbar-spur-user .navbar-nav .nav-item .nav-link {
color: #356275 !important;
}
.navbar-spur-user .navbar-nav .nav-item .active {
color: white !important;
}
Any advice, links to resources that would help me, or feedback would be greatly appreciated. Thank you!
Peter, I believe your problem has to do with the width of your logo under the class "navbar-brand". I had a similar issue, but fixed it by controlling the width of my logo under the Navbar-brand. According to bootstrap, "Adding images to the .navbar-brand will likely always require custom styles or utilities to properly size." Below is bootstraps example:
<!-- Just an image -->
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="#">
<img src="/docs/4.4/assets/brand/bootstrap-solid.svg" width="30" height="30" alt="">
</a>
</nav>
Notice the width and height settings after the image. In my case I was able to change the width of my logo image in CSS within my media query for small screen sizes.
I am trying to create a navigation bar. I have used bootstrap for the body of my site and would like the navigation bar to span the same width. However, I want the border to span the full width; so that the elements 'Home, Learn, Progress, etc' appear to be right above the things in the actual page but not so that the border is cut off.
<div class="navbar container">
<div class="navbar-left">
{% url 'quizapp-home' as url %}
</i> Home
{% url 'quizapp-learn' as url %}
</i> Learn
{% url 'progress' as url %}
</i> Progress
</div>
<div class='navbar-right'>
{% if user.is_authenticated %}
{% url 'profile' as url %}
<a href='{{ url }}' {% if request.path|slice:":9" == url %} id="current" {% endif %}> Profile</a>
{% url 'logout' as url %}
<a href='{{ url }}' {% if request.path|slice:":8" == url %} id="current" {% endif %}>Logout</a>
{% else %}
{% url 'login' as url %}
<a href='{{ url }}' {% if request.path|slice:":7" == url %} id="current" {% endif %}>Login</a>
{% endif %}
</div>
</div>
.navbar {
background-color: #ffffff;
overflow: hidden;
font-family: "Century Gothic", Century, sans-serif;
font-weight: bold;
list-style-type: none;
border-bottom: 2px solid #ccc;
/* box-shadow: 2px 2px 10px grey; */
}
.navbar a {
float: left;
color: #cccccc; /* light grey */
text-align: center;
padding: 10px 12px;
text-decoration: none;
font-size: 22px;
transition: all 0.3s ease; /* Add transition for hover effects */
}
.navbar a:hover {
color: #737373; /* dark grey */
}
.active {
color: #34a7e0; /* blue */
}
#current {
color: #34a7e0; /* blue */
}
.navbar-left a {
margin-left: 10px;
margin-right: 20px;
}
.navbar-right a {
margin-right: 10px;
float: left;
font-size: 18px;
}
Just wrap the .navbar contents into a .container:
<nav class="navbar">
<div class="container">
<a class="navbar-brand" href="#">Navbar</a>
<!-- Your regular navbar content here, aligned with the page contents... -->
</div>
</nav>
Documented here. No custom CSS required.
Working example:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<body>
<nav id="navbar-example2" class="navbar navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="#">Navbar</a>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="#fat">#fat</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#mdo">#mdo</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#one">one</a>
<a class="dropdown-item" href="#two">two</a>
<div role="separator" class="dropdown-divider"></div>
<a class="dropdown-item" href="#three">three</a>
</div>
</li>
</ul>
</div>
</nav>
<main>
<div class="container">
<h1>Hello, world!</h1>
</div>
</main>
</body>
Try this:
.navbar {
width: 100%;
}
The background-image seems to be repeating on chrome at the bottom of the page however this does not happen in safari.
Here is how it looks in safari and how I want it to look:
And here is how it looks on chrome:
Here is the css code I'm using for this image:
<!-- Used to extend the base html to this html page -->
{% extends "updates/base.html" %}
{% load static %}
<!-- This is to load tags determine if user is a moderator, superuser, or if user's group == update.game -->
{% load users_tags %}
<!-- Put your CSS files here -->
{% block styles %}
<link rel="stylesheet" type="text/css" href="{% static 'updates/css/title_updates.css' %}">
<style>
body {
background: url("{{ game.cover_display.url }}") no-repeat 0 3.5rem;
background-size: 100% auto;
-webkit-background-size: 100% auto;
-moz-background-size: 100% auto;
-o-background-size: 100% auto;
}
</style>
{% endblock styles %}
<!-- Actual Content for the homepage goes here -->
{% block content %}
<!-- Game Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-mygrey position">
<div class="navbar-collapse collapse w-100 order-1 order-md-0 dual-collapse2">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link text-light" href="#">Updates</a>
</li>
<li class="nav-item">
<a class="nav-link text-light" href="#">Bugs</a>
</li>
<li class="nav-item">
<a class="nav-link text-light" href="#">Petitions</a>
</li>
</ul>
</div>
<div class="mx-auto order-0">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".dual-collapse2">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link text-primary" href="#">
<i class="fab fa-twitter fa-lg"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link text-light" href="#">
<i class="fab fa-reddit-alien fa-lg"></i>
</a>
</li>
</ul>
</div>
</nav>
<!-- End of Game Navbar -->
<div class="bg-mygrey mb-5">
<div class="row mt-1 pl-3 pr-3 pt-3 pb-3">
<div class="col-md-3 text-center">
<img class="img-fluid" src="{{ game.cover.url }}" alt="{{ game.title }} Cover Image">
</div>
<div class="col-md-9">
<p class="text-light text-break">{{ game.description }}</p>
<button class="btn btn-myblue dropdown-toggle" type="button" id="platform"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select platform
</button>
<div class="dropdown-menu" id="plat-form-options">
{% for platform in game.platform.all %}
<a class="dropdown-item"
onclick="platFormSelect('{% url 'title-updates-ajax' slug=game.slug platform_id=platform.id %}', '{{ platform }}')">{{ platform }}</a>
{% endfor %}
</div>
{% if user.is_authenticated %}
{% if subscription_status %}
<a href="{% url 'unsubscription' slug=game.slug %}" id="subscription"
class="btn btn-myblue">
Unsubscribe
</a>
{% else %}
<a href="{% url 'subscription' slug=game.slug %}" id="subscription" class="btn btn-myblue">
Subscribe
</a>
{% endif %}
{% endif %}
{% if request.user.is_superuser or user|is_group:game.title %}
<a class="btn btn-success" href="{% url 'update-create' %}" aria-label="Create">
<i class="fas fa-plus" aria-hidden="true"></i>
</a>
{% else %}
{% endif %}
</div>
</div>
<div id="updates_data">
</div>
</div>
<script>
$(document).ready(function () {
if ($("#plat-form-options option").length > 0) {
$("#plat-form-options option")[0].click();
}
});
function platFormSelect(url, platform) {
$('#platform').text(platform);
$.get(url, function (response) {
$('#updates_data').html(response);
})
.done(function () {
})
.fail(function () {
});
}
</script>
{% endblock content %}
Edit: The problem seems to be coming from the either the navbar or the row below it.
The cut off of the background-image/repeat starts at the bottom of the row
Try using shorthand:
body {
background: url("{{ game.cover_display.url }}") no-repeat 0 3.5rem;
background-size: 100% auto;
-webkit-background-size: 100% auto;
-moz-background-size: 100% auto;
-o-background-size: 100% auto;
}