I'm pretty new with bootstrap and css. Firstly, I would like to know if the code I wrote is correct. Working with more containers is fine? I use fluid containers for header and footer (width 100% vw), and a standard container for the contents.
Secondly, I m not sure what is the best way to code my footer. I need it on the bottom of the page, but not fixed with absolute position (I dont want it fixed in the browser window).
I tried different solutions without succeding. Shall I nest all my containers in another one?
Thank you so much, and sorry if I didn't explain perfectly or I missed anything.
<div class="container">
<div class="row">
<div clas="col-xs-12">
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="navbar-brand no_margins">
<img src="images/logo.png" alt="logo">
</div>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active">
<a href="#">
About
</a>
</li>
<li>
<a href="#">
Works
</a>
</li>
<li>
<a href="#">
News
</a>
</li>
<li>
<a href="#">
Contacts
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</div>
<!-- close container navbar-->
<!-- header -->
<div class="container">
<div class="row">
<header class="col-xs-12 static_header">
<div class="row">
<div class="col-xs-12 col-sm-3 hidden-xs logo_header">
<img src="images/logo_header.png" />
</div>
<div class="col-xs-12 col-sm-9 title_header">
<h1>
My Title
</h1>
</div>
</div>
</header>
</div>
</div>
<!-- end header -->
<!-- content -->
<div class="container">
<div>
<div class="row">
<div class="col-xs-12" id="content_box">
<h2>
About
</h2>
<p>
my text
</p>
</div>
</div>
</div>
</div>
<!-- end content -->
<footer class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 contact_footer">
info#site.com<br>
+1 234567890
</div>
<div id="footer_social_bar" class="col-xs-12 col-sm-4">
<img src="images/fb.png"/>
<img src="images/linkedin.png"/>
<img src="images/twitter.png"/>
</div>
<div class="col-xs-12 col-sm-4 copyright">
© 2017, company
</div>
</div>
</div>
</div>
</div>
</footer>
If you're concerned about viewers using a screen that is far bigger than the content you have in your website, you can use the following css to make sure that the site is at least as big as their browser.
html{
height:100%;
}
body{
min-height:100%;
background-color:#0C0;
}
<p>I only have a small amount of content. But the body background-color is as big as the screen</p>
Related
my hamburger button isn't working when I minimize the page to mobile size. Everything else seems to flow correctly, I've checked numerous times on the code and it seems to be correct. At this point, I'm not sure whether it's the script codes I have down below which disables the drop-down menu or what?
<!DOCTYPE html>
<html>
<head>
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="gallery.css">
</head>
<body>
<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" date-target="#bs-nav-demo" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="glyphicon glyphicon-picture" aria-hidden="true"></span> IMAGES
</div>
<div class="collapse navbar-collapse" id="bs-nav-demo-1">
<ul class="nav navbar-nav">
<li>About</li>
<li>Contact</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1><span class="fas fa-camera-retro"></span> The Image Gallery</h1>
<p>Wonderful pictures at your disposal!</p>
</div>
<div class="row">
<div class="col-lg-4 col-sm-6" >
<div class="thumbnail">
<img src="http://i.imgur.com/qK42fUu.jpg">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1435771112039-1e5b2bcad966?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1442406964439-e46ab8eff7c4?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439524970634-649c37a69e5c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1450&h=825&fit=crop&s=bfda9916c885869b43b70738693428d9">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1444090542259-0af8fa96557e?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1434543177303-ef2cc7707e0d?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1436262513933-a0b06755c784?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439396087961-98bc12c21176?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439694458393-78ecf14da7f9?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
</div>
</div>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>
-> please update following code into your existing code.
-> must be same id name into button data-target name and collapse id name.
-> also add meta tag into head tag.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="gallery.css">
</head>
<body>
<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="#bs-nav-demo-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="glyphicon glyphicon-picture" aria-hidden="true"></span> IMAGES
</div>
<div class="collapse navbar-collapse" id="bs-nav-demo-1">
<ul class="nav navbar-nav">
<li>About</li>
<li>Contact</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1><span class="fas fa-camera-retro"></span> The Image Gallery</h1>
<p>Wonderful pictures at your disposal!</p>
</div>
<div class="row">
<div class="col-lg-4 col-sm-6" >
<div class="thumbnail">
<img src="http://i.imgur.com/qK42fUu.jpg">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1435771112039-1e5b2bcad966?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1442406964439-e46ab8eff7c4?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439524970634-649c37a69e5c?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1450&h=825&fit=crop&s=bfda9916c885869b43b70738693428d9">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1444090542259-0af8fa96557e?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1434543177303-ef2cc7707e0d?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1436262513933-a0b06755c784?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439396087961-98bc12c21176?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="thumbnail">
<img src="https://images.unsplash.com/photo-1439694458393-78ecf14da7f9?dpr=2&fit=crop&fm=jpg&h=825&q=50&w=1450">
</div>
</div>
</div>
</div>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>
I have an attached background image on the container, but it only goes with like half the columns and then the columns overflow and the bg image stops.
i tried min-height
the 2 columns are in a container and the columns contain multiple rows
i don't understand why on earth the container is not growing with the columns
HTML:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css"> </head>
<body>
<div class="bg-primary text-center d-flex align-items-center h-50" style="background-image: url("projektberge.png");">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="display-1 text-white">COVER</h1>
<p class="lead text-white">Lorem ipsum dolor sit amet, consectetur adipisici elit.</p>
Button
</div>
</div>
</div>
</div>
<nav class="navbar navbar-expand-md navbar-light bg-faded text-center">
<div class="container">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar2SupportedContent" aria-controls="navbar2SupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
<div class="collapse navbar-collapse text-center justify-content-center" id="navbar2SupportedContent">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="attached" style="background-image: url("FB-1_Christopher Gusenbauer_PanoramaBahnhof.jpg");">
<div class="h-100">
<div class="container-fluid w-100">
<div class="row h-100">
<div class="col-md-8">
<div class="row" style="height:100%">
<div class="col-md-2 h-100 bg-primary" style="height:100%">
<h1 class="">Summary</h1>
</div>
<div class="col-md-10 h-100">
<div class="row ">
<div class="jumbotron jumbotron-fluid w-100">
<div class="container">
<h1 class="display-3">Jumbotron</h1>
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12"></div>
</div>
<div class="row bg-primary">
<div class="col-md-6 bg-secondary">
<img class="img-fluid d-block py-3" src="https://pingendo.com/assets/photos/wireframe/photo-1.jpg"> </div>
<div class="col-md-6 py-3">
<h1 class="">Heading</h1>
<p class="">Paragraph</p>
</div>
</div>
<div class="row">
<div class="col-md-12 bg-primary"></div>
</div>
<div class="row">
<div class="col-md-12 bg-primary">
<div class="container">
<header class="page-header">
<h1>Dark Responsive Timeline with Bootstrap</h1>
</header>
<ul class="timeline">
<li>
<div class="tldate">Apr 2014</div>
</li>
<li>
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>Surprising Headline Right Here</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 3 hours ago</small></p>
</div>
<div class="tl-body">
<p>Lorem Ipsum and such.</p>
</div>
</div>
</li>
<li class="timeline-inverted">
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>Breaking into Spring!</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 4/07/2014</small></p>
</div>
<div class="tl-body">
<p>Hope the weather gets a bit nicer...</p>
<p>Y'know, with more sunlight.</p>
</div>
</div>
</li>
<li>
<div class="tldate">Mar 2014</div>
</li>
<li>
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>New Apple Device Release Date</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 3/22/2014</small></p>
</div>
<div class="tl-body">
<p>In memory of Steve Jobs.</p>
</div>
</div>
</li>
<li class="timeline-inverted">
<div class="timeline-panel">
<div class="tl-heading">
<h4>No icon here</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 3/16/2014</small></p>
</div>
<div class="tl-body">
<p>Here you'll find some beautiful photography for your viewing pleasure, courtesy of
lorempixel.</p>
<p>
<img src="http://lorempixel.com/600/300/nightlife/" alt="lorem pixel"> </p>
</div>
</div>
</li>
<li>
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>Some Important Date!</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 3/03/2014</small></p>
</div>
<div class="tl-body">
<p>Write up a quick summary of the event.</p>
</div>
</div>
</li>
<li>
<div class="timeline-panel noarrow">
<div class="tl-heading">
<h4>Secondary Timeline Box</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 3/01/2014</small></p>
</div>
<div class="tl-body">
<p>This might be a follow-up post with related info. Maybe we include some extra links, tweets, user comments, photos, etc.</p>
</div>
</div>
</li>
<li>
<div class="tldate">Feb 2014</div>
</li>
<li class="timeline-inverted">
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>The Winter Months</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 02/23/2014</small></p>
</div>
<div class="tl-body">
<p>Gee time really flies when you're having fun.</p>
</div>
</div>
</li>
<li>
<div class="tl-circ"></div>
<div class="timeline-panel">
<div class="tl-heading">
<h4>Yeah we're pretty much done here</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 02/11/2014</small></p>
</div>
<div class="tl-body">
<p>Wasn't this fun though?</p>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12"></div>
</div>
</div>
<div class="row"> </div>
<div class="row"> </div>
<div class="row"> </div>
<div class="row"> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://pingendo.com/assets/bootstrap/bootstrap-4.0.0-alpha.6.min.js"></script>
</div>
</body>
</html>
It's a bug in Boostrap 4 alpha 6.
It's fixed in Boostrap 4 beta 1 that it's under development.
I noticed you are using Pingendo, you can use the Bootstrap 4 beta 1 version changing the import at the end of your sass file in
#import 'bootstrap-4.0.0-alpha.6';
It seems you haven't included bootstrap references inside your head tag
Here are the links - Bootstrap Js Link
Bootstrap CSS Link
Add them like this.
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/css/bootstrap.min.css" integrity="sha512-siwe/oXMhSjGCwLn+scraPOWrJxHlUgMBMZXdPe2Tnk3I0x3ESCoLz7WZ5NTH6SZrywMY+PB1cjyqJ5jAluCOg==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.1/js/bootstrap.min.js" integrity="sha512-vyRAVI0IEm6LI/fVSv/Wq/d0KUfrg3hJq2Qz5FlfER69sf3ZHlOrsLriNm49FxnpUGmhx+TaJKwJ+ByTLKT+Yg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
I am using bootstrap in Angular 2 project and I want to freeze couple of divs(with ids as filters and categories in the code) on top always, while user scrolls down the page.
This is the code that I have in jsfiddle here
Code Snippet:
<nav class="navbar navbar-default 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>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li routerLinkActive="active"><a routerLink="/overview">Overview</a></li>
<li routerLinkActive="active"><a routerLink="/insights">Insights</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<div id="filters" class="container-fluid" style="margin-top: 60px" >
<div class="row">
<div class="col-md-2 col-sm-4">
<button>Filter 1</button>
</div>
<div class="col-md-2 col-sm-4">
<button>Filter 2</button>
</div>
</div>
</div>
<div id="categories" class="container-fluid" >
<div class="row">
<ul class="nav navbar-nav">
<li><a routerLink="#">Sub Category 1</a></li>
<li><a routerLink="#">Sub Category 2</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12">
<div style="background: blue; height: 800px;">
Trend Chart
</div>
</div>
<div class="col-md-6 col-sm-12 col-xs-12">
<div style="background: green; height: 800px;">
Bar Chart
</div>
</div>
</div>
</div>
I have tried using bootstrap's 'affix', but it is breaking the scroll and the margins of 'filters' and 'categories' divs, as can be seen here
Kindly let me know if I am missing anything else that needs to be added for affix to work.
To achieve your goal you need to use position: fixed and z-index: 1030 CSS with your div
Here's the jsfiddle
Use this CSS in your div
<div id="filters" class="container-fluid"
style="margin-top: 60px; position: fixed; z-index: 1030;">
<div class="row">
<div class="col-md-2 col-sm-4">
<button>Filter 1</button>
</div>
<div class="col-md-2 col-sm-4">
<button>Filter 2</button>
</div>
</div>
</div>
Use the style attribute "position:fixed" in both the div you want to be fixed.
Also set z-index value above 100. (this is to show the fixed div over all other div while scrolling).
Example:
<div id="filters" class="container-fluid" style="margin-top: 60px;position:fixed;z-index:999;" >
<div class="row">
<div class="col-md-2 col-sm-4">
<button>Filter 1</button>
</div>
<div class="col-md-2 col-sm-4">
<button>Filter 2</button>
</div>
</div>
</div>
<div id="categories" class="container-fluid" style="position:fixed;z-index:999;" >
<div class="row">
<ul class="nav navbar-nav">
<li><a routerLink="#">Sub Category 1</a></li>
<li><a routerLink="#">Sub Category 2</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12">
<div style="background: blue; height: 800px;">
Trend Chart
</div>
</div>
<div class="col-md-6 col-sm-12 col-xs-12">
<div style="background: green; height: 800px;">
Bar Chart
</div>
</div>
</div>
</div>
Please take look at my portfolio site
the toggle hamburger button for navigation for smaller screen sizes doesn't work i.e nothing happens and the links don't show up when I click on it.
the images and boxes for the portfolio apps showcased becomes too small for smaller screen sizes even though I used col-sm-12, dunno why this is happening?
I have noticed that there is a horizontal bar too for small screen sizes, which shouldn't be there. It seems that it's the portfolio heading and the contact me heading causing this. could you tell me how to fix this?
<!--Navbar Begins -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- navbar header begins -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<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="#">Faraz Ahmed</a>
</div>
<!-- navbar header ends -->
<!-- div collapse begins -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>About
</li>
<li>Portfolio
</li>
<li>Contact
</li>
</ul>
</div>
<!-- div collapse ends -->
</div>
<!-- container-fluid ends -->
</nav>
<!--Navbar ends -->
<div id="aboutme" class="about container-fluid">
<div class="row">
<div class="col-lg-12 col-md-8 col-sm-6">
<img class="img-responsive img-circle" src="http://res.cloudinary.com/whizzy/image/upload/v1454699647/faraz_qwdqrx.jpg">
<h1>Faraz Ahmed</h1>
<hr><i class="fa fa-star"></i>
<hr>
<p>I am a self taught web developer who has learnt html,css, Javascript,Jquery and bootstrap too. I keep building websites and other apps to practice what I have learnt. The psd to html site below and the sites with carousel and overlay are all responsive.
Go ahead and take a look at them in your mobile and see how they adjust to your screen size.</p>
</div>
</div>
</div>
<div id="portfolioz" class="portfolio container-fluid">
<div class="row">
<div class="col-md-12 col-md-10 col-sm-12">
<h1>Portfolio</h1>
<hr><i class="fa fa-star"></i>
<hr>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwXYbM">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/v1454696279/random-quotes_wkbzgo.jpg">
</a>
<p>This is the random quotes generator</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/PZzgvR">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454696085/pomodoro_rnl9n4.jpg">
</a>
<p>This is the pomodoro timer</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/XXjEYE">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454695469/javascript-calculator_zksddu.jpg">
</a>
<p>This is the javascript calculator</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/GZWNOX">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/carousel-experiment_sd0wev.jpg">
</a>
<p>Carousel Experiment with in psd to html site</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/eJqPjy">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/portfolio-site_gmac46.jpg">
</a>
<p>My Portfolio site showcasing projects & experiments</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/ZQRvKL">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/overlay-experiment_eocbsr.jpg">
</a>
<p>Experimenting with overlay and pop-up boxes</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwoGMB">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367863/weatherapp_zvihox.jpg">
</a>
<p>My Weather app</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/BKGXNG">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367830/wikiview_slscex.jpg">
</a>
<p>Wikipedia Viewer</p>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme">
<a class="thumbnail" href="http://codepen.io/silentarrowz/full/qZLZEy">
<img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1467313840/twitch-tv_vhqntl.jpg">
</a>
<p>Twitch Tv Streamer</p>
</div>
</div>
</div>
<div id="contactme" class="contact container-fluid">
<div class="row">
<div class="col-md-12">
<h2> Connect with me:</h2>
<a href="http://www.twitter.com/faraz">
<button id="btn5" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i>Twitter</button>
</a>
<a href="http://www.github.com/silentarrowz">
<button id="btn6" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i>Github</button>
</a>
<a href="https://www.linkedin.com/profile/view?id=AAMAAAOtZrQByiBQ7mnkxFa8BDodzVKYzsI7T3Y&trk=hp-identity-name">
<button id="btn7" class="btn btn-default btn-lg"><i class="fa fa-linkedin fa-fw"></i>Linkedin</button>
</a>
<a href="http://www.freecodecamp.com/silentarrowz">
<button id="btn8" class="btn btn-default btn-lg"><i class="fa fa-fire fa-fw"></i>freeCodeCamp</button>
</a>
</div>
</div>
</div>
<div class="footer">
<p>Copyright Reserved By Faraz Ahmed # 2016</p>
</div>
Problem
you are missing bootstrap.js
Explanation
Boostrap navbar requires JavaScript plugin to work, and you are missing it. You can see in Boostrap Docs
Requires JavaScript plugin
If JavaScript is disabled and the viewport is narrow enough that the
navbar collapses, it will be impossible to expand the navbar and view
the content within the .navbar-collapse.
The responsive navbar requires the collapse plugin to be included in
your version of Bootstrap.
Working Snippet
body{
font-size:14px;
}
.container-fluid{
max-width:1200px;
}
.hoverme{
height:400px;
margin-bottom:20px;
overflow :hidden;
max-width:340px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<!--Navbar Begins -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- navbar header begins -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<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="#">Faraz Ahmed</a>
</div> <!-- navbar header ends -->
<!-- div collapse begins -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>About</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
</div><!-- div collapse ends -->
</div><!-- container-fluid ends -->
</nav>
<!--Navbar ends -->
<div id="aboutme" class="about container-fluid">
<div class="row">
<div class="col-lg-12 col-md-8 col-sm-6">
<img class="img-responsive img-circle" src="http://res.cloudinary.com/whizzy/image/upload/v1454699647/faraz_qwdqrx.jpg">
<h1>Faraz Ahmed</h1>
<hr><i class="fa fa-star"></i><hr>
<p>I am a self taught web developer who has learnt html,css, Javascript,Jquery and bootstrap too. I keep building websites and other apps to practice what I have learnt. The psd to html site below and the sites with carousel and overlay are all responsive. Go ahead and take a look at them in your mobile and see how they adjust to your screen size.</p>
</div>
</div>
</div>
<div id="portfolioz" class="portfolio container-fluid">
<div class="row">
<div class="col-md-12 col-md-10 col-sm-12">
<h1>Portfolio</h1>
<hr><i class="fa fa-star"></i><hr>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwXYbM"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/v1454696279/random-quotes_wkbzgo.jpg"></a>
<p> This is the random quotes generator</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/PZzgvR"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454696085/pomodoro_rnl9n4.jpg"></a>
<p> This is the pomodoro timer</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"> <a class="thumbnail" href="http://codepen.io/silentarrowz/full/XXjEYE"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1454695469/javascript-calculator_zksddu.jpg"></a>
<p> This is the javascript calculator</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/GZWNOX"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/carousel-experiment_sd0wev.jpg"></a>
<p>Carousel Experiment with in psd to html site</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/eJqPjy"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/portfolio-site_gmac46.jpg"></a>
<p>My Portfolio site showcasing projects & experiments</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/ZQRvKL"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1459189426/overlay-experiment_eocbsr.jpg"></a>
<p>Experimenting with overlay and pop-up boxes</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/YwoGMB"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367863/weatherapp_zvihox.jpg"></a>
<p>My Weather app </p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/BKGXNG"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1462367830/wikiview_slscex.jpg"></a>
<p>Wikipedia Viewer</p></div>
<div class="col-lg-4 col-md-4 col-sm-6 thumb hoverme"><a class="thumbnail" href="http://codepen.io/silentarrowz/full/qZLZEy"><img class="img-responsive" src="http://res.cloudinary.com/whizzy/image/upload/c_scale,h_300,w_400/v1467313840/twitch-tv_vhqntl.jpg"></a>
<p>Twitch Tv Streamer</p></div>
</div>
</div>
<div id="contactme" class="contact container-fluid">
<div class="row">
<div class="col-md-12">
<h2> Connect with me:</h2>
<a href="http://www.twitter.com/faraz">
<button id="btn5" class="btn btn-default btn-lg"><i class="fa fa-twitter fa-fw"></i>Twitter</button>
</a>
<a href="http://www.github.com/silentarrowz">
<button id="btn6" class="btn btn-default btn-lg"><i class="fa fa-github fa-fw"></i>Github</button>
</a>
<a href="https://www.linkedin.com/profile/view?id=AAMAAAOtZrQByiBQ7mnkxFa8BDodzVKYzsI7T3Y&trk=hp-identity-name">
<button id="btn7" class="btn btn-default btn-lg"><i class="fa fa-linkedin fa-fw"></i>Linkedin</button>
</a>
<a href="http://www.freecodecamp.com/silentarrowz">
<button id="btn8" class="btn btn-default btn-lg"><i class="fa fa-fire fa-fw"></i>freeCodeCamp</button>
</a>
</div>
</div>
</div>
<div class="footer">
<p>Copyright Reserved By Faraz Ahmed # 2016</p>
</div
Image and text should be in center. Text goes to the center but image falls on the top of text. I want text and image in same way but only at the center. Thanks in advance
Below is my code:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class='col-md-12-fluid' style="
padding-bottom: 2px;
background-color:#7E8F7C;
">
<div class "row" style="background-color:red !important">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html"></a>
</div>
<div class='col-md-4-fluid' style="background-color:#3B3738; height:25px;">
<h3>Nepal Safety</h3>
</div>
</div>
<div class="row">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html">
<img src="images/iccn.png" height="50px" width="100px">
</a>
</div>
<br>
<div class='col-md-4-fluid'>
<h3>Nepal Safety</h3>
</div>
</div>
</div>
<div class='clearfix'></div>
<div class="navbar-header">
Here it is:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class='col-md-12-fluid' style="padding-bottom: 2px; background-color:#7E8F7C; min-height: 500px;">
<div class="row" style="background-color:red !important">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html"></a>
</div>
<div class='col-md-4-fluid' style="background-color:#3B3738; height:25px;">
<h3>Nepal Safety</h3>
</div>
</div>
<div class="row" style="clear: both">
<div class='col-md-8-fluid' style="width: 500px; margin: 0 auto; background: blue">
<!--recently search was here-->
<a class="navbar-brand" href="index.html" style="float: left">
<img src="images/iccn.png" height="50px" width="100px">
</a>
<h3>Nepal Safety</h3>
</div>
</div>
</div>
<div class='clearfix'></div>
<div class="navbar-header">
This should work:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class='col-md-12-fluid' style="
padding-bottom: 2px;
background-color:#7E8F7C;
">
<div class="row" style="background-color:red !important">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html"></a>
</div>
<div class='col-md-4-fluid' style="background-color:#3B3738; height:25px;">
<h3>Nepal Safety</h3>
</div>
</div>
<div class="row">
<div class='col-md-6'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html" style="float:right;">
<img src="images/iccn.png" height="50px" width="100px">
</a>
</div>
<br>
<div class='col-md-6'>
<h3>Nepal Safety</h3>
</div>
</div>
</div>
<div class='clearfix'></div>
<div class="navbar-header">
I changed the columns to be 6 and 6, making them each half the width of the screen. I removed "fluid" from the column classes (since you've got the encompassing div set to fluid, you don't need any of its children fluid). Finally, I floated the image right so it'll sit beside the header.
Tell me if that's what you were looking for!