How can make bootstrap carousel center - css

Good day, I' using bootstrap 3 and trying to make my bootstrap carousel in center. Here is the script which i try so far.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.navbar.transparent.navbar-inverse .navbar-inner {
border-width: 0px;
-webkit-box-shadow: 0px 0px;
box-shadow: 0px 0px;
background-color: rgba(0,0,0,0.0);
background-image: -webkit-gradient(linear, 50.00% 0.00%, 50.00% 100.00%, color-stop( 0% , rgba(0,0,0,0.00)),color-stop( 100% , rgba(0,0,0,0.00)));
background-image: -webkit-linear-gradient(270deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
background-image: linear-gradient(180deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
}
#Intro {
display: inline-block;
}
#topnavbar {
top: 20px;
}
.carousel {
width:600px;
height:400px;
}
.carousel-inner > .item > img {
margin: 0 auto;
}
div.c-wrapper{
width: 100%; /* for example */
margin: auto;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img{
width: 100%; /* use this, or not */
margin: auto;
}
.container{
border: 1px;
}
</style>
</head>
<body>
<div class="container" style="border:1px solid #cecece;">
<div id="Intro" class="col-md-offset-5">
LOGO
</div>
<nav id="topnavbar" class="navbar transparent">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About Us</li>
<li>Product</li>
<li>Promo</li>
<li>Competition</li>
<li>Ladies Room</li>
<li>Need Help?</li>
</ul>
</div>
</nav>
<div class="c-wrapper">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="https://dummyimage.com/600x400/000/fff">
</div>
<div class="item">
<img src="http://via.placeholder.com/350x150">
</div>
<div class="item">
<img src="http://via.placeholder.com/350x150">
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</body>
</html>
But, with my script above my Caraousel still in the left of screen. then i try to searching with google and i find this https://stackoverflow.com/questions/19582340/make-bootstraps-carousel-both-center-and-responsive but still no help . Any solution ? thanks in advance and sorry for my bad english

You're simply missing one line of code:
.carousel {
margin: 0 auto;
}
The carousel is a <div>, which is a block-level element, so you centralise it by setting the horizontal margins to auto. The shorthand margin: 0 auto sets the top and bottom margins to 0 while setting the horizontal margins to auto.
Here's a working example (click 'Full page' after running the snippet):
.navbar.transparent.navbar-inverse .navbar-inner {
border-width: 0px;
-webkit-box-shadow: 0px 0px;
box-shadow: 0px 0px;
background-color: rgba(0, 0, 0, 0.0);
background-image: -webkit-gradient(linear, 50.00% 0.00%, 50.00% 100.00%, color-stop( 0%, rgba(0, 0, 0, 0.00)), color-stop( 100%, rgba(0, 0, 0, 0.00)));
background-image: -webkit-linear-gradient(270deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.00) 100%);
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.00) 100%);
}
#Intro {
display: inline-block;
}
#topnavbar {
top: 20px;
}
.carousel {
width: 600px;
height: 400px;
margin: 0 auto;
}
.carousel-inner>.item>img {
margin: 0 auto;
}
div.c-wrapper {
width: 100%;
/* for example */
margin: auto;
}
.carousel-inner>.item>img,
.carousel-inner>.item>a>img {
width: 100%;
/* use this, or not */
margin: auto;
}
.container {
border: 1px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" style="border:1px solid #cecece;">
<div id="Intro" class="col-md-offset-5">
LOGO
</div>
<nav id="topnavbar" class="navbar transparent">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About Us</li>
<li>Product</li>
<li>Promo</li>
<li>Competition</li>
<li>Ladies Room</li>
<li>Need Help?</li>
</ul>
</div>
</nav>
<div class="c-wrapper">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="https://dummyimage.com/600x400/000/fff">
</div>
<div class="item">
<img src="http://via.placeholder.com/350x150">
</div>
<div class="item">
<img src="http://via.placeholder.com/350x150">
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
</div>
</body>
</html>
Hope this helps! :)

Related

background image not showing in different html page

I'm creating a simple bootstrap template, but i facing a problem. My problem is my background image not showing.
.asheader{
background:url('asset/header_bg.png')no-repeat;
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
.asfooter{
background-image:url('asset/footer_bg.png');
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
i wonder why, because i have 2 html pages index.html and index2.html , in my index.html the background img is showsing up, but in index2.html the background is not showing up.
here is my index.html fullpage
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="asset/css/flexslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
#media (max-width: 766px){
img{
width:50%;
height:50%;
}
}
#media (min-width: 768px){
.navbar-nav{
float:none;
margin: 0 auto;
display: table;
table-layout: fixed;
}
}
.navbar.transparent.navbar-inverse .navbar-inner {
border-width: 0px;
-webkit-box-shadow: 0px 0px;
box-shadow: 0px 0px;
background-color: rgba(0,0,0,0.0);
background-image: -webkit-gradient(linear, 50.00% 0.00%, 50.00% 100.00%, color-stop( 0% , rgba(0,0,0,0.00)),color-stop( 100% , rgba(0,0,0,0.00)));
background-image: -webkit-linear-gradient(270deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
background-image: linear-gradient(180deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
}
#Intro {
display: inline-block;
}
#topnavbar {
top: 15px;
}
.carousel {
width:600px;
height:300px;
margin: 0 auto;
}
.lookbook{
width:600px;
height:auto;
margin: 0 auto;
}
.lookbook > h2{
text-align: center;
}
.ladiesroom{
width:600px;
height:300px;
margin: 0 auto;
}
.ladiesroom > h2{
text-align: center;
}
.afterlookbook{
width:630px;
height:300px;
margin: 0 auto;
}
.instagram{
width:630px;
height:auto;
margin: 0 auto;
border: 1px solid blue;
}
.instagram > h2{
text-align: center;
padding-bottom: 10px;
}
.carousel-inner > .item > img {
margin: 0 auto;
}
div.c-wrapper{
width: 100%;
margin: auto;
}
.navbar a {
color: black;
}
blockquote{
width:600px;
height:300px;
margin: 0 auto;
margin-top: 50px;
border: 2px 0px 2px 0px #000;
border: none;
}
blockquote:before {
color: #ccc;
content: open-quote;
font-size: 4em;
line-height: 0.1em;
margin-right: 0.25em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img{
width: 100%; /* use this, or not */
margin: auto;
}
.container-fluid
{
padding-top: 50px;
background-size:100% auto;
}
.top-buffer { margin-top:10px; }
.asheader{
background:url('asset/header_bg.png')no-repeat;
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
.asfooter{
background-image:url('asset/footer_bg.png');
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="asheader">
<div id="Intro" class="col-md-offset-5">
<img src="asset/logo_hitam.png" width="200px" height="50px">
</div>
<nav id="topnavbar" class="navbar transparent">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About Us</li>
<li>Product</li>
<li>Promo</li>
<li>Competition</li>
<li>Ladies Room</li>
<li>Need Help?</li>
</ul>
</div>
<!--- -->
</nav>
<div class="c-wrapper">
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="https://dummyimage.com/600x300/000/fff">
</div>
<div class="item">
<img src="https://dummyimage.com/600x300/000/000">
</div>
<div class="item">
<img src="https://dummyimage.com/600x300/000/000">
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
<div class="lookbook">
<h2>Lookbook</h2>
<div id="" class="flexslider slide_thumb">
<ul class="slides">
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
</ul>
</div>
</div>
<div class="afterlookbook">
<div class="col-lg-6 col-sm-2 col-sm-12">
<img src="asset/mini-banner.jpg" width="100%" height="100%">
</div>
<div class="col-lg-6 col-sm-12">
<img src="asset/mini-banner.jpg" width="100%" height="100%">
</div>
<br><br>
<div class="top-buffer col-lg-6 col-lg-push-6 col-sm-12">
<img src="asset/quiz_mini-banner.jpg" width="100%" height="100%"></div>
<div class="top-buffer col-lg-6 col-lg-pull-6 col-sm-12">
<img src="asset/mini-banner.jpg" width="100%" height="100%"></div>
</div>
</div>
<blockquote style="border-top:5px solid black; border-bottom: 5px solid black;" class="quotes">
<p>asdfasdfasdfasdf</p>
</blockquote>
<div class="asfooter">
<div class="ladiesroom">
<h2>Ladie's Room</h2>
<table class="table table-bordered">
<tr>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
</tr>
</table>
</div>
<div class="instagram">
<h2>See The Latest On Instagram</h2>
<table class="table table-bordered">
<tr>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
<td><img src="http://via.placeholder.com/100x100"></td>
</tr>
</table>
</div>
</div>
</div>
<script defer src="asset/js/jquery.flexslider.js"></script>
<script>
$(document).ready(function(){
$(window).resize(function() {
if ($(window).width() < 960) {
$('.navbar').removeClass('transparent');
$('.navbar').toggleClass('navbar-default');
}
else {
$('.navbar').toggleClass('transparent');
$('.navbar').removeClass('navbar-default');
}
})
})
$(document).ready(function() {
$('.slide_thumb').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 210,
itemMargin: 5,
asNavFor: '.slide_thumb',
itemWidth: 210,
itemMargin: 5,
minItems: 2,
maxItems: 4
});
});
</script>
</body>
</html>
and here is index2.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="asset/fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="asset/css/flexslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
#media (min-width: 768px){
.navbar-nav{
float:none;
display: table;
table-layout: fixed;
}
}
.navbar.transparent.navbar-inverse .navbar-inner {
border-width: 0px;
-webkit-box-shadow: 0px 0px;
box-shadow: 0px 0px;
background-color: rgba(0,0,0,0.0);
background-image: -webkit-gradient(linear, 50.00% 0.00%, 50.00% 100.00%, color-stop( 0% , rgba(0,0,0,0.00)),color-stop( 100% , rgba(0,0,0,0.00)));
background-image: -webkit-linear-gradient(270deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
background-image: linear-gradient(180deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.00) 100%);
}
#topnavbar,#bottomnavbar{
top: 15px;
}
#bottomnavbar{
height:100px;
}
.carousel-inner > .item > img {
margin: 0 auto;
}
div.c-wrapper{
width: 100%;
margin: auto;
}
.navbar a {
color: black;
}
.center-block {
margin-right: auto;
margin-left: auto;
}
.navbar .navbar-nav {
display: inline-block;
float: none;
}
.navbar .navbar-collapse {
text-align: center;
}
.asheader{
background:url('asset/header_bg.png')no-repeat;
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
.asfooter{
background-image:url('asset/footer_bg.png');
background-repeat:norepeat;
background-position: center;
background-size: contain;
}
blockquote{
border: none;
border-bottom: 1px solid #ccc;
border-top:1px solid #ccc;
}
</style>
</head>
<body>
<div class="asheader">
<div id="Intro" class="col-md-offset-5 col-md-5">
<img src="asset/logo_hitam.png" width="200px" height="50px">
</div>
<nav id="topnavbar" class="navbar transparent col-md-offset-2 col-md-8">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About Us</li>
<li>Product</li>
<li>Promo</li>
<li>Competition</li>
<li>Ladies Room</li>
<li>Need Help?</li>
</ul>
</div>
<!--- -->
</nav>
<div class="c-wrapper">
<div id="myCarousel" style="background:black !important" class="carousel slide col-md-offset-3 col-md-6">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img src="https://dummyimage.com/600x300/000/fff">
</div>
<div class="item">
<img src="https://dummyimage.com/600x300/000/000">
</div>
<div class="item">
<img src="https://dummyimage.com/600x300/000/000">
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div>
<div class="lookbook col-md-offset-3 col-md-6 text-center">
<h2>Lookbook</h2>
<div id="" class="flexslider slide_thumb">
<ul class="slides">
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
</ul>
</div>
</div>
<div class="grid col-md-offset-3 col-md-6 text-center">
<table class="table">
<tr>
<td><img src="asset/mini-banner.jpg" width="100%" height="100%"></td>
<td> <img src="asset/mini-banner.jpg" width="100%" height="100%"></td>
</tr>
<tr>
<td>
<img src="asset/mini-banner.jpg" width="100%" height="100%">
</td>
<td> <img src="asset/mini-banner.jpg" width="100%" height="100%">
</td>
</tr>
</table>
</div>
<div class="quote col-md-offset-3 col-md-6 text-center">
<blockquote class="quote-card">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</p>
<cite>
Lorem I psum
</cite>
</blockquote>
</div>
</div>
<div class="lookbook col-md-offset-3 col-md-6 text-center">
<h2>Ladies Room</h2>
<div id="" class="flexslider slide_thumb">
<ul class="slides">
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_cheesecake_brownie.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_lemon.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_donut.jpg" />
</li>
<li>
<img src="asset/images/kitchen_adventurer_caramel.jpg" />
</li>
</ul>
</div>
</div>
<div class="instagram col-md-offset-3 col-md-6 text-center">
<h2>See The Latest On Instagram</h2>
<table class="table table-bordered">
<tr>
<td><img src="http://via.placeholder.com/120x120"></td>
<td><img src="http://via.placeholder.com/120x120"></td>
<td><img src="http://via.placeholder.com/120x120"></td>
<td><img src="http://via.placeholder.com/120x120"></td>
<td><img src="http://via.placeholder.com/120x120"></td>
</tr>
</table>
</div>
<div class="instagram col-md-offset-3 col-md-6 text-center">
<h2>SUBSCRIBE TO OUR NEWSLETTER</h2>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.
Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
</p>
<div class="input-group">
<input type="text" class="form-control"/>
<span class="input-group-addon">
<i class="fa fa-check"></i>
</span>
</div>
</div>
<nav id="bottomnavbar" class="navbar navbar-inverse col-md-12 fixed-bottom">
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collection of nav links, forms, and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>About Us</li>
<li>Product</li>
<li>Promo</li>
<li>Competition</li>
<li>Ladies Room</li>
<li>Need Help?</li>
</ul>
</div>
<!--- -->
</nav>
</div>
<script src="asset/js/jquery.flexslider.js"></script>
<script>
$(document).ready(function(){
$(window).resize(function() {
if ($(window).width() < 960) {
$('.navbar').removeClass('transparent');
$('.navbar').toggleClass('navbar-default');
}
else {
$('.navbar').toggleClass('transparent');
$('.navbar').removeClass('navbar-default');
}
})
})
$(document).ready(function() {
$('.slide_thumb').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 210,
itemMargin: 5,
asNavFor: '.slide_thumb',
itemWidth: 210,
itemMargin: 5,
minItems: 4,
maxItems: 4
});
});
</script>
</body>
</html>
any solution ? thanks in advance. Here is my folder structure
I do a test in index2. i add this in my css
body{
background:url('asset/header_bg.png')no-repeat;
}
the image is showing up. So, it's 100% not a path problem
I guess the fact that the <blockquote> element is missing in the second html document is causing the backgroud-image dimensions to be missing too (not set). Somehow the size of the background-image is depending on that element. Adding some dimensions to the quote class seems to fix it, i.e.:
.quotes {
height: 600px;
}
I hope it helps!

Developed a website using Bootstrap & it is responsive at some point

I have started developing a website using bootstrap and it is responsive but only to some extend.
If i minimize the browser, the contents auto-arrange itself but as i keep on minimizing at some point the h1 & p contents stop being responsive.`
<html lang="en">
<head>
<title>NiKuLsAn DeSiGn</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
body {
background-color: black;
}
.imageAndText {position: relative;}
.imageAndText .col {position: absolute; z-index: 1; top: 50px; right: 70px;}
.imageAndText .col2 {position: absolute; z-index: 1; top: 200px; left: 150px;}
.imageAndText .col3 {position: absolute; z-index: 1; top: 50px; left: 150px;}
p{
font-size: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="imageAndText">
<img src="banner1.jpg" class="img-responsive" style="width:100%; height:auto;">
<div class="col">
<ul class="nav navbar-nav">
<li>About</li>
<li>Services</li>
<li>Contact</li>
</ul>
</div>
<div class="col3">
<img src="logo.jpg" alt="logo" />
</div>
<div class="col2">
<h1>Amazing Dude.</h1>
<h1>Amazing Life.</h1>
<p>Welcome to the personal site of <b>John Doe</b><br>A professional skier and a musician.</p>
</div>
</div>
</div>
</div>
</body>
Please help as I am not able to understand what is going wrong.
I have created an example where I have used minimal custom CSS and everything else is wprking using bootstrap framework.. Have a look and ask your queries.
body {
background: url('http://placehold.it/1920x400') no-repeat center center;
background-size: cover;
/* Workaround for some mobile browsers */
min-height: 100%;
padding-top: 20px;
padding-bottom: 20px;
background-color: #000;
}
.featurette-divider {
margin: 20px 0;
border: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="navbar-wrapper CustomNavbar">
<div class="container">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Logo Goes here</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">Home
</li>
<li>About
</li>
<li>Contact
</li>
<li class="dropdown">
Dropdown <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li>Separated link
</li>
<li>One more separated link
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<hr class="featurette-divider">
<div class="container ">
<div class="col-sm-12">
<h1>Amazing Dude.</h1>
<h1>Amazing Life.</h1>
<p>Welcome to the personal site of <b>John Doe</b>
<br>A professional skier and a musician.</p>
</div>
</div>

Slider and navbar in one

I have a problem in my css. I want to make my navbar like this ( as you can see, it has no background on navbar and it joins with slider ). I have tried every advice in youtube tutorials but nothing worked.
Here's the link I want to show you:
http://theme.ridianur.com/alamak/
I was able to change the color background of my navbar by opening bootstrap.min.css in notepad, search for "navbar-default", and change the color code. But, I wasn't able to make it no background like I want to.
My html :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="boot/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<title>Image Slider</title>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>HOME</li>
<li>NEWS</li>
<li>ABOUT</li>
<li>CONTACT US</li>
</ul>
<div class="logo">
<img src="kets.png">
</div>
</div>
</nav>
<div class="container-fluid hero-slide">
<div class="row">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img/1.jpg" alt="Cats1">
<div class="carousel-caption">
<div class="tekslide1">
<h1>Hewan yang mainstream</h1>
<p>Kita juga gatau kenapa milih topik kucing</p>
</div>
</div>
</div>
<div class="item">
<img src="img/2.jpg" alt="Cats2">
</div>
<div class="item">
<img src="img/3.jpg" alt="Cats3">
</div>
<div class="item">
<img src="img/4.jpg" alt="Cats4">
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</body>
</html>
and my css :
#charset "utf-8";
#font-face{
font-family: 'custom';
src: url('OpenSans-Regular.ttf') format('truetype'); //<-- semicolon
}
#font-face{
font-family: 'custom1';
src: url('Alternate.ttf') format('truetype'); //<-- semicolon
}
#media (min-width: 768px){
.navbar .navbar-nav{
display: inline-block;
float: none;
vertical-align: top;
font-family: 'custom';
letter-spacing: 5px;
padding-top: 12px;
margin-bottom: -20px;
}
.tekslide1{
font-size: 25px;
padding-left: 300px;
padding-bottom: 500px;
font-family: 'custom1';
}
.navbar .navbar-collapse{
text-align: right;
padding-right: 120px;
}
.navbar-default .navbar-collapse .nav >li >a {
color: #EEEEEE;
margin-left: 10px;
margin-right: 5px;
font-size: 13px;
}
.navbar-default .navbar-collapse .nav >li >a:hover, .navbar-default .navbar-collapse .nav >li >a:focus{
color: #BDBDBD;
background: none;
}
.logo{
float: left;
padding: 2px;
margin: 2px;
margin-bottom: -15px;
margin-left: 5%;
border: none;
border-radius: 100px;
}
.hero-slide{
margin-top: -20px;
}
.navbar li { color: #000 }
Any help would be appreciated. Thanks!
I'll explain this in pseudocode. If you want help you need include relevant bits of html and css in your post, not the archive of an entire site.
This effect you're looking for is nothing more than:
<div class="wrapper">
<div class="navigation">
</div>
<div class="banner">
</div>
</div>
and
.wrapper{background:url('your_image.jpg');}
.navigation, .banner{background:transparent;}
A graphic applied to a parent container and navigation / banner with transparent backgrounds.

Bootstrap toggle button does not work when I put an image at down

I'm new on web design and I'm trying to use bootstrap toggle button, but it does not works when I put an image at down, I supose that the content is displaying at back of that Image.
This is the css and html, you can run code snipet to see what happens.
.mynavbar{
height: 83px !important;
font-family: 'Raleway',verdana !important;
background: rgb(238,238,238) !important;
margin-bottom: 0px;
}
.mynavbar>.container-fluid>.navbar-collapse>ul{
margin-top: 15px;
}
.mynavbar>.container-fluid>.navbar-header>div>.navbar-brand{
margin-top: 15px;
}
.blabla{
position: relative;
font-family: 'Old Standard TT',serif;
}
.inner {
text-align: center;
color:white;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Hi</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<nav class="navbar navbar-default mynavbar">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#togglebutton">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="vRef">
<a class="navbar-brand" href="#">Company Name</a>
</div>
</div>
<div class="collapse navbar-collapse" id="togglebutton">
<ul class="nav navbar-nav navbar-right">
<li>Us </li>
<li>Login </li>
<li class="dropdown">
Service <span class="caret"></span>
<ul class="dropdown-menu">
<li>Contact</li>
<li>Action</li>
<li role="separator" class="divider"></li>
<li>Separated link</li>
<li role="separator" class="divider"></li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
<div class="row">
<div class="blabla">
<img src="http://static.panoramio.com/photos/original/182912.jpg" class="img-responsive" alt="website template image">
<div class="inner"><h1>My Company Name</h1><br/><h4>Some thing about m company</h4></div>
</div>
</div>
</div>
</body>
</html>
I know that something in css code is wrong, just when I'm centering the text with .blabla and .inner classes. But I need that and I dont know how to do that without killing toggle button function.
Any orientation?
Sorry for my bad english and thanks.
The reason you cant see your toggled menu is you are forcing the height of your navbar using height: 83px !important; the navigation toggle actually makes the height larger to show the hidden elements.
change the code for .mynavbar to use min-height: 83px; instead of the !important style
JSFIDDLE
You defined fixed height for .mynavbar. You need to remove that and make margin-bottom: 0 !important to remove a gap between menu and image. And to make a view as you need, you can add padding-bottom: 20px;.
Look at snippet
.mynavbar{
font-family: 'Raleway',verdana !important;
background: rgb(238,238,238) !important;
margin-bottom: 0px !important;
padding-bottom: 20px;
}
.mynavbar>.container-fluid>.navbar-collapse>ul{
margin-top: 15px;
}
.mynavbar>.container-fluid>.navbar-header>div>.navbar-brand{
margin-top: 15px;
}
.blabla{
position: relative;
font-family: 'Old Standard TT',serif;
}
.inner {
text-align: center;
color:white;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Hi</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<nav class="navbar navbar-default mynavbar">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#togglebutton">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="vRef">
<a class="navbar-brand" href="#">Company Name</a>
</div>
</div>
<div class="collapse navbar-collapse" id="togglebutton">
<ul class="nav navbar-nav navbar-right">
<li>Us </li>
<li>Login </li>
<li class="dropdown">
Service <span class="caret"></span>
<ul class="dropdown-menu">
<li>Contact</li>
<li>Action</li>
<li role="separator" class="divider"></li>
<li>Separated link</li>
<li role="separator" class="divider"></li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
<div class="row">
<div class="blabla">
<img src="http://static.panoramio.com/photos/original/182912.jpg" class="img-responsive" alt="website template image">
<div class="inner"><h1>My Company Name</h1><br/><h4>Some thing about m company</h4></div>
</div>
</div>
</div>
</body>
</html>
Another way, if you don't want to change height of menu, is to add z-index: -1; to .blabla class, but then you need to add background to submenu
.mynavbar{
height: 83px !important;
font-family: 'Raleway',verdana !important;
background: rgb(238,238,238) !important;
margin-bottom: 0px;
}
.mynavbar>.container-fluid>.navbar-collapse>ul{
margin-top: 15px;
background: rgb(238,238,238) !important;
}
.mynavbar>.container-fluid>.navbar-header>div>.navbar-brand{
margin-top: 15px;
}
.blabla{
position: relative;
font-family: 'Old Standard TT',serif;
z-index: -1;
}
.inner {
text-align: center;
color:white;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Hi</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<nav class="navbar navbar-default mynavbar">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#togglebutton">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="vRef">
<a class="navbar-brand" href="#">Company Name</a>
</div>
</div>
<div class="collapse navbar-collapse" id="togglebutton">
<ul class="nav navbar-nav navbar-right">
<li>Us </li>
<li>Login </li>
<li class="dropdown">
Service <span class="caret"></span>
<ul class="dropdown-menu">
<li>Contact</li>
<li>Action</li>
<li role="separator" class="divider"></li>
<li>Separated link</li>
<li role="separator" class="divider"></li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
<div class="row">
<div class="blabla">
<img src="http://static.panoramio.com/photos/original/182912.jpg" class="img-responsive" alt="website template image">
<div class="inner"><h1>My Company Name</h1><br/><h4>Some thing about m company</h4></div>
</div>
</div>
</div>
</body>
</html>
if you meant, that the menu is not visible, add z-index to .mynavbar and make this class as relative position. Check this fiddle
.mynavbar{
height: 83px !important;
font-family: 'Raleway',verdana !important;
background: rgb(238,238,238) !important;
margin-bottom: 0px;
position:relative;
z-index:1;
}
In your css change:
.inner {
Text-align: center;
Color:white;
Position: absolute;
Left: 50%;
Top: 50%;
Transform: translate(-50%, -50%);
}
To
.inner {
Text-align: center;
Color:white;
Position: absolute;
Left: 50%;
Top: 50%;
Margin-right: -50%
Transform: translate(-50%, -50%);
}
You need the margin-right to compensate for the margin left and also benefical as it makes your div responsive

Showing full height image on every browsers

I'd like to show an image, full height image, like this website on every browsers without writing specific number of pixels like height: 400px;.
mobile
laptop
How should I change my css? Would you please let me know?
html {
font-size: 62.5% !important; /* 10 px */
}
/*header {
position: absolute;
text-align: center;
top: 0px;
z-index: 1000;
color: #fff;
width: 100%;
height: 64px;
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}*/
/*img {
display: block;
max-width: 100%;
height: auto;
}*/
.carousel-control.left, .carousel-control.right {
background: none !important;
filter: progid: none !important;
outline: 0;
}
.carousel .carousel-control {
visibility: hidden;
}
.carousel:hover .carousel-control {
visibility: visible;
}
.carousel-indicators {
bottom:-50px;
}
.carousel-inner {
margin-bottom:50px;
}
/*.logo {
float: left;
text-align: left;
display: inline-block;
}*/
.transparent-header {
z-index: 22;
position: absolute;
width: 100%;
left: 0;
background-color: rgba(255, 255, 255, 0.9);
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
#carousel-example-generic {
width: 100%;
height: 100%;
position: relative;
}
.nav::after,
.nav::before,
.navbar-header::after,
.navbar::after {
display: table-caption;
}
.nav.navbar-nav li,
.nav.navbar-nav li a {
display: inline-block;
}
#gnav {
font-size: 0.9em;
width: 100% !important;
}
#gnav
/*#gnav_nav*/ {
text-align: center;
}
#logo
img {
display: block;
margin: auto;
}
#intro {
position: relative;
overflow: hidden;
}
#bg-image3 {
background: url("http://htmlcoder.me/preview/the_project/v.1.3/template/images/slider-fullscreen-slide-1.jpg");
}
.bg-image {
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: block;
overflow: hidden;
position: relative;
width: 100%;
height: 100%;
}
<!DOCTYPE html>
<html lang="en-EN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- for IE -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>{% block title %}{% endblock %}</title>
<meta name=”robots” content=”noindex,nofollow,noarchive,noodp,noydir”>
<!-- <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.css"> -->
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="{% static 'font-awesome/css/font-awesome.min.css' %}" />
{% block additional_css %}{% endblock %}
{% block custom_css %}{% endblock %}
</head>
<body>
<div id="wrapper">
<!-- <div class="container" id="range">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3" style="background-color:Yellow;">ExtraSmall</div>
<div class="hidden-xs col-sm-6 col-md-4 col-lg-3" style="background-color:green;">Small</div>
<div class="hidden-xs hidden-sm col-md-4 col-lg-3" style="background-color:blue;">Midium</div>
<div class="hidden-xs hidden-sm hidden-md col-lg-3" style="background-color:Red;">Large</div>
</div>
</div> -->
<!-- Header -->
<header id="header" class="header clearfix fixed transparent-header" >
<div class="container-fluid" id="header-inner">
<div class="row">
<!-- Global Navigation -->
<div id="gnav" class="" data-spy="affix" data-offset-top="94">
<nav class="navbar navbar-inverse" id="gnav_nav">
<ul class="nav navbar-nav" id="gnav_ul">
<li class="dropdown">
<a class="" data-toggle="dropdown" href="index.html">商品紹介</a>
<!-- Dropdown -->
<ul class="dropdown-menu">
<li>
<a class="" href='#'>ジュース <i class=""></i></a>
<ul class="sub-dropdown">
<li>オレンジ</li>
<li>アップル</li>
<li>グレープ</li>
</ul>
</li>
<li>
<a class="" href='#'>寿司 <i class=""></i></a>
<ul class="sub-dropdown">
<li>マグロ</li>
<li>サーモン</li>
<li>エンガワ</li>
</ul>
</li>
</ul> <!-- dropdown-menu -->
</li> <!-- .dropdown -->
<li class="dropdown">
<a class="" data-toggle="dropdown" href="index.html">ご注文</a>
<ul class="dropdown-menu">
<li>
<a class="" href='#'>スマートフォン <i class=""></i></a>
<ul class="sub-dropdown">
<li>iPhone</li>
<li>Xperia</li>
<li>Galaxy</li>
</ul>
</li>
<li>
<a class="" href='#'>野菜 <i class=""></i></a>
<ul class="sub-dropdown">
<li>トマト</li>
<li>レタス</li>
<li>枝豆</li>
</ul>
</li>
</ul> <!-- dropdown-menu -->
</li> <!-- .dropdown -->
<li class="dropdown">
<a class="" data-toggle="dropdown" href="index.html">お問い合わせ</a>
<ul class="dropdown-menu">
<li><a class="" href='#'>自分用</a></li>
<li><a class="" href='#'>他人用</a></li>
</ul> <!-- dropdown-menu -->
</li> <!-- .dropdown -->
<li class="dropdown">
<a class="" data-toggle="dropdown" href="index.html">会社案内</a>
<ul class="dropdown-menu">
<li><a class="" href='#'>フォーム</a></li>
<li><a class="" href='#'>電話</a></li>
</ul> <!-- dropdown-menu -->
</li> <!-- dropdown -->
</ul> <!-- .nav .navbar-nav -->
</nav> <!-- .navbar .navbar-default -->
</div> <!-- #gnav .col-md-9 -->
<!-- Logo -->
<div id="logo" class="">
<a href="#">
<img src="http://vignette2.wikia.nocookie.net/logopedia/images/e/ee/Burger_King_Logo.svg.png/revision/20120422044236" id="logo-img" class="img-responsive logo-img" height="50" width="50">
</a>
</div> <!-- #logo .col-sm-3 -->
</div> <!-- .row -->
</div> <!-- .container -->
</header> <!-- #header .clearfix -->
<section id="intro">
<article id="apple">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img class="melon img-responsive" src="http://htmlcoder.me/preview/the_project/v.1.3/template/images/slider-fullscreen-slide-1.jpg" alt="First slide">
</div>
<div class="item">
<img class="melon img-responsive" src="http://htmlcoder.me/preview/the_project/v.1.3/template/images/slider-fullscreen-slide-2.jpg" alt="Second slide">
</div>
<div class="item" id="bg-image3">
<div class="bg-image" id="bg-image3">
<h2 class="" id="">This is the headline</h2>
<p class="" id="">This is a pen. This is an apple. U~n, apple pen.</p>
</div>
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="icon-prev" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div>
<span>Bootstrap carousel</span>
</div>
</article>
</section>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
<h1><span>I LOVE TOMATO!!!!</span></h1><br>
</div> <!-- #wrapper -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</body>
</html>
Bootstrap: 3.3.4, HTML5, jQuery: 2.1.3
Set your image as background-image for that element with background-size: cover;
Set that element to height: 100vh;
Quick example: https://jsbin.com/dajepaw/1/
*{box-sizing:border-box;margin:0;}
html, body{height:100%;font:14px/1.4 sans-serif;}
header {
position: fixed;
z-index: 1;
width: 100%;
top: 0;
height: 72px;
background: #fff;
}
article {
background: #fff;
height: 50vh;
} article:nth-child(odd) {
background: #f7f7f7;
}
footer {
background: #444;
height: 72px;
}
/* SPECIAL CLASSES */
.fullWithBackground {
height: 100vh;
background: url(https://i.stack.imgur.com/LCupt.png) 50% fixed;
background-size: cover;
color: #fff;
}
.centerInner{
display: flex;
align-items: center;
justify-content: center;
}
<header>Header</header>
<div class="fullWithBackground centerInner">
<div>GALLERY</div>
</div>
<main>
<article>Article 1</article>
<article>Article 2</article>
</main>
<footer>Footer</footer>

Resources