Topic: FULL PAGE INTRO WITH FIXED NAVBAR not displaying correctly
Yasin at Loyal Loops pro asked 7 years ago
and here is my style.css
html,
body,
header,
.view {
height: 100%;
}
/* Navigation*/
.navbar {
background-color: #4285F4;
}
/*Intro*/
.view {
background: url("https://mdbootstrap.com/img/Photos/Horizontal/Nature/12-col/img%20(54).jpg")no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
`
do you guys know what im doing wrong? i have the pro version.
Marta Wierzbicka staff answered 7 years ago
Marta Wierzbicka staff answered 7 years ago
<!DOCTYPE html>
<html lang="en" class="full-height">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Material Design Bootstrap</title>
<!--Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css">
<!--Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--Material Design Bootstrap -->
<link href="css/mdb.min.css" rel="stylesheet">
<!--Your custom styles (optional) -->
<link href="css/style.css" rel="stylesheet">
<style type="text/css">
.full-height,
.full-height body,
.full-height header,
.full-height header .view {
height: 100%; }
/*Intro*/
.view {
background: url("https://mdbootstrap.com/img/Photos/Others/img (50).jpg")no-repeat center center;
background-size: cover;
}
</style>
</head>
<body class="mdb-skin">
<header>
<nav class="navbar fixed-top navbar-toggleable-md navbar-dark scrolling-navbar">
<div class="container">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="#">
<strong>Navbar</strong>
</a>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link">Features</a>
</li>
<li class="nav-item">
<a class="nav-link">Pricing</a>
</li>
<li class="nav-item btn-group">
<a class="nav-link dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenu1">
<a class="dropdown-item">Action</a>
<a class="dropdown-item">Another action</a>
<a class="dropdown-item">Something else here</a>
</div>
</li>
</ul>
<ul class="navbar-nav nav-flex-icons">
<li class="nav-item">
<a class="nav-link"><i class="fa fa-facebook"></i></a>
</li>
<li class="nav-item">
<a class="nav-link"><i class="fa fa-twitter"></i></a>
</li>
<li class="nav-item">
<a class="nav-link"><i class="fa fa-instagram"></i></a>
</li>
</ul>
</div>
</div>
</nav>
<!--Mask-->
<div class="view hm-black-strong">
<div class="full-bg-img flex-center">
<div class="container">
<div class="white-text text-center wow fadeInUp">
<h2>This Navbar is fixed</h2>
<h5>It will always stay visible on the top, even when you scroll down</h5>
<br>
<p>Full page intro with background image will be always displayed in full screen mode, regardless of device </p>
</div>
</div>
</div>
</div>
<!--/.Mask-->
</header>
<!--Main layout-->
<main class="pt-6 text-center">
<h2>Your content</h2>
</main>
<!--/Main layout-->
<!--SCRIPTS -->
<!--JQuery -->
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<!--Bootstrap tooltips -->
<script type="text/javascript" src="js/tether.min.js"></script>
<!--Bootstrap core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!--MDB core JavaScript -->
<script type="text/javascript" src="js/mdb.min.js"></script>
</body>
</html>
Best,
Marta
KUSHAL KANT free commented 7 years ago
I am using this one when I am scrolling 'top-nav-collapse' not adding like as giving example. https://mdbootstrap.com/live/_MDB/index/docs/page-layouts/intro-fixed-transparent.htmlxardonik free answered 7 years ago
Yasin at Loyal Loops pro answered 7 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No