I am trying to put an icon at the end of my navigation bar.
When I put it before my ul tags, it shows up, according to this code:
<div class="navigation">
<i class="fa fa-instagram"></i>
<ul>
<li class="menu active">Discover</li>
<li class="menu">Fashion</li>
<li class="menu">Creative portraits</li>
<li class="menu">Client work</li>
<br>
<br>
<li class="contact">About</li>
<li class="contact">Contact</li>
</ul>
<br>
<br>
</div>
However, as soon as I place the icon after, it does not show up, as demonstrated in this code.
<div class="navigation">
<i class="fa fa-instagram"></i>
<ul>
<li class="menu active">Discover</li>
<li class="menu">Fashion</li>
<li class="menu">Creative portraits</li>
<li class="menu">Client work</li>
<br>
<br>
<li class="contact">About</li>
<li class="contact">Contact</li>
</ul>
<br>
<br>
<i class="fa fa-instagram"></i>
</div>
What can I do to make it appear??
Your code works fine, see below. Maybe you should add your CSS to find the problem.
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<div class="navigation">
<i class="fa fa-instagram"></i>
<ul>
<li class="menu active">Discover</li>
<li class="menu">Fashion</li>
<li class="menu">Creative portraits</li>
<li class="menu">Client work</li>
<br>
<br>
<li class="contact">About</li>
<li class="contact">Contact</li>
</ul>
<br>
<br>
<i class="fa fa-instagram"></i>
</div>
Your code working fine. Add font awesome CDN <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
. This will work for you
Related
Using sb admin panel 2 in my application. I want to make second level menu in side menu, but when i do that, second level menu is always open. I want when I click first level menu then second menu appear. Not able to understand where is the problem.
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li class="sidebar-search">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Search...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<i class="fa fa-search"></i>
</button>
</span>
</div>
<!-- /input-group -->
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i> Dashboard
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>Sudent <span class="fa arrow"></span>
<ul class="nav nav-second-level">
<li>
Student
</li>
<li>
Subject
</li>
</ul>
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i>Routine <span class="fa arrow"></span>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
this code is present in my page header and added all js in my footer
<!-- jQuery -->
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- Morris Charts JavaScript -->
<script src="../bower_components/raphael/raphael-min.js"></script>
<script src="../bower_components/morrisjs/morris.min.js"></script>
<script src="../js/morris-data.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
Add collapse class to your second level
<ul class="nav nav-second-level collapse">
P.S
it looks like you are using SBAdmin V2 and not V1, should specify that.
Also, i would suggest to try copy/paste from their demo pages and modifying it to your likings.
SBAdminV2 Live Preview
SBAdminV2 Github page (Source, Documentation, and HELP! :) )
SBAdminV1 Live Preview
EDIT
Seems to work fine with their exact code.
<link href="https://blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<link href="https://blackrockdigital.github.io/startbootstrap-sb-admin-2/dist/css/sb-admin-2.css" rel="stylesheet">
<link href="https://blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/morrisjs/morris.css" rel="stylesheet">
<link href="https://blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<!-- /.navbar-header -->
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav in" id="side-menu">
<li class="sidebar-search">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Search...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<i class="fa fa-search"></i>
</button>
</span>
</div>
<!-- /input-group -->
</li>
<li>
<i class="fa fa-dashboard fa-fw"></i> Dashboard
</li>
<li>
<i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span>
<ul class="nav nav-second-level collapse">
<li>
Flot Charts
</li>
<li>
Morris.js Charts
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<i class="fa fa-table fa-fw"></i> Tables
</li>
<li>
<i class="fa fa-edit fa-fw"></i> Forms
</li>
<li>
<i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span>
<ul class="nav nav-second-level collapse">
<li>
Panels and Wells
</li>
<li>
Buttons
</li>
<li>
Notifications
</li>
<li>
Typography
</li>
<li>
Icons
</li>
<li>
Grid
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<i class="fa fa-sitemap fa-fw"></i> Multi-Level Dropdown<span class="fa arrow"></span>
<ul class="nav nav-second-level collapse">
<li>
Second Level Item
</li>
<li>
Second Level Item
</li>
<li>
Third Level <span class="fa arrow"></span>
<ul class="nav nav-third-level collapse">
<li>
Third Level Item
</li>
<li>
Third Level Item
</li>
<li>
Third Level Item
</li>
<li>
Third Level Item
</li>
</ul>
<!-- /.nav-third-level -->
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li>
<i class="fa fa-files-o fa-fw"></i> Sample Pages<span class="fa arrow"></span>
<ul class="nav nav-second-level collapse">
<li>
Blank Page
</li>
<li>
Login Page
</li>
</ul>
<!-- /.nav-second-level -->
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<!-- /#page-wrapper -->
</div>
<script src="//blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/jquery/jquery.min.js"></script>
<script src="//blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="//blackrockdigital.github.io/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js"></script>
<script src="//blackrockdigital.github.io/startbootstrap-sb-admin-2/dist/js/sb-admin-2.js"></script>
</body>
having some issue with my bootstrap side nav.
Any content i try to add the page just overlaps on top of the Nav bar.
You can see it here -
http://35.197.236.48/#
What i want to happen is for the content to be to the right of the navbar.
I've tried adding rows/columns/containers and just can't get it work properly.
Can anyone see where I have gone wrong?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="stylesheet">
<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>
<script type="text/javascript" src="js"></script>
<script src="https://use.fontawesome.com/c6d65aa6d0.js"></script>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Tools</title>
</head>
<body>
<!-- Nav bar, Using bootstrap -->
<div class="nav-side-menu">
<div class="brand">Brand Logo</div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list">
<ul id="menu-content" class="menu-content collapse out">
<li>
<a href="#">
<i class="fa fa-dashboard fa-lg"></i> Dashboard
</a>
</li>
<li data-toggle="collapse" data-target="#products" class="collapsed active">
<i class="fa fa-gift fa-lg"></i> UI Elements <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="products">
<li class="active">CSS3 Animation</li>
<li>General</li>
<li>Buttons</li>
<li>Tabs & Accordions</li>
<li>Typography</li>
<li>FontAwesome</li>
<li>Slider</li>
<li>Panels</li>
<li>Widgets</li>
<li>Bootstrap Model</li>
</ul>
<li data-toggle="collapse" data-target="#service" class="collapsed">
<i class="fa fa-globe fa-lg"></i> Services <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="service">
<li>New Service 1</li>
<li>New Service 2</li>
<li>New Service 3</li>
</ul>
<li data-toggle="collapse" data-target="#new" class="collapsed">
<i class="fa fa-car fa-lg"></i> New <span class="arrow"></span>
</li>
<ul class="sub-menu collapse" id="new">
<li>New New 1</li>
<li>New New 2</li>
<li>New New 3</li>
</ul>
<li>
<a href="#">
<i class="fa fa-user fa-lg"></i> Profile
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users fa-lg"></i> Users
</a>
</li>
</ul>
</div>
</div>
<div class="row-one">
<div class="container-fluid">
<div class="row" style="margin-top:5%;">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<ul class="list-group features-box">
<li class="list-group-item features-box text-center">
<h4>Number of Hosts</h4>
<span>.</span>
</li>
</ul>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<ul class="list-group features-box">
<li class="list-group-item features-box text-center">
<h4>Hosts Online</h4>
<span>.</span>
</li>
</ul>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<ul class="list-group features-box">
<li class="list-group-item features-box text-center">
<h4>Hosts Offline</h4>
<span></span>
</li>
</ul>
</div>
</div>
</div>
</div>
Add pull-right class to div.row-one, and give below css,
.row-one.pull-right {
width: calc(100% - 300px);
}
I have the following,
<header id="header">
<div class="header__top">
<div class="container">
<ul class="top-nav"><!-- new name -->
<li class="dropdown top-nav__profile">
Hi Mallinda!
<ul class="dropdown-menu">
<li>Profile</li>
<li class="top-nav__saved">Saved Searches</li>
<li class="top-nav__saved">Saved Agents</li>
<li class="top-nav__saved">Saved Listings</li>
<li>Email Preferences</li>
<li>Logout</li>
</ul>
</li>
<li class="top-nav__icon">
<i class="zmdi zmdi-notifications"></i>
</li>
<li class="pull-right top-nav__icon">
<i class="zmdi zmdi-facebook"></i>
</li>
<li class="pull-right top-nav__icon">
<i class="zmdi zmdi-twitter"></i>
</li>
<li class="pull-right top-nav__icon">
<i class="zmdi zmdi-google"></i>
</li>
</ul>
</div>
</div>
</header>
Since I have a lot of nested classes, I've decided to choose a new name 'top-nav' after certain level. Is it valid in BEM? or do I need to phrase block name 'header__' to every child element?
You may put blocks inside other blocks or elements. It is absolutely valid.
I am working on the BucketAdmin template by Theme Bucket.
Everything works smooth but when I edit the Side-bar code, it stops collapsing and opening. Here is the original code.
I am a newbie at this so please also explain the issue.
<aside>
<div id="sidebar" class="nav-collapse">
<!-- sidebar menu start-->
<div class="leftside-navigation">
<ul class="sidebar-menu" id="nav-accordion">
<li>
<a href="index.html">
<i class="fa fa-dashboard"></i>
<span>Dashboard</span>
</a>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-laptop"></i>
<span>Layouts</span>
</a>
<ul class="sub">
<li>Boxed Page</li>
<li>Horizontal Menu</li>
<li>Language Switch Bar</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-book"></i>
<span>UI Elements</span>
</a>
<ul class="sub">
<li>General</li>
<li>Buttons</li>
<li>Typography</li>
<li>Widget</li>
<li>Slider</li>
<li>Tree View</li>
<li>Nestable</li>
<li>Grids</li>
<li>Calender</li>
<li>Draggable Portlet</li>
</ul>
</li>
<li>
<a href="fontawesome.html">
<i class="fa fa-bullhorn"></i>
<span>Fontawesome </span>
</a>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-th"></i>
<span>Data Tables</span>
</a>
<ul class="sub">
<li>Basic Table</li>
<li>Responsive Table</li>
<li>Dynamic Table</li>
<li>Editable Table</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-tasks"></i>
<span>Form Components</span>
</a>
<ul class="sub">
<li>Form Elements</li>
<li>Advanced Components</li>
<li>Form Wizard</li>
<li>Form Validation</li>
<li>Muliple File Upload</li>
<li>Dropzone</li>
<li>Inline Editor</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-envelope"></i>
<span>Mail </span>
</a>
<ul class="sub">
<li>Inbox</li>
<li>Compose Mail</li>
<li>View Mail</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class=" fa fa-bar-chart-o"></i>
<span>Charts</span>
</a>
<ul class="sub">
<li>Morris</li>
<li>Chartjs</li>
<li>Flot Charts</li>
<li>C3 Chart</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class=" fa fa-bar-chart-o"></i>
<span>Maps</span>
</a>
<ul class="sub">
<li>Google Map</li>
<li>Vector Map</li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;" class="active">
<i class="fa fa-glass"></i>
<span>Extra</span>
</a>
<ul class="sub">
<li class="active">Blank Page</li>
<li>Lock Screen</li>
<li>Profile</li>
<li>Invoice</li>
<li>Pricing Table</li>
<li>Timeline</li>
<li>
Media Gallery
</li>
<li>404 Error
</li>
<li>500 Error</li>
<li>Registration</li>
<li>Blank2</li>
</ul>
</li>
<li>
<a href="login.html">
<i class="fa fa-user"></i>
<span>Login Page</span>
</a>
</li>
</ul>
</div>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
Here is the edited code
<aside>
<div id="sidebar" class="nav-collapse">
<!-- sidebar menu start-->
<div class="leftside-navigation">
<ul class="sidebar-menu" id="nav-accordion">
<li> <i class="fa fa-dashboard"></i> <span>Dashboard</span> </li>
</ul>
</div>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
Don't delete, I simply commented the part which I wanted to remove and it worked.
I'm working on Foundation Zurb template and I'm trying to get it working.
I have Top Bar at the top of the screen (full width), Icon Bar at the left side (full height). I know that Foundation has 12 grid system.
According to Foundation:
The Foundation Top Bar gives you a great way to display a complex
navigation bar on small, medium or large screens.
And:
An Icon Bar provides a menu to quickly navigate an app. Use the Icon
Bar horizontally or vertically, with the labels below the icons or to
the right. Have it your way.
Here is my template. I've took out div.large-9.columns etc.. Because they were braking the view.
<!-- Navigation -->
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1>LOGO PLACEHOLDER</h1>
</li>
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><i class="fa fa-diamond"></i> Go PRO</li>
<li class="has-dropdown">
<i class="fa fa-user"></i> My Account
<ul class="dropdown">
<li>Some Li's here</li>
</ul>
</li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li><i class="fa fa-database"></i> ONE</li>
<li><i class="fa fa-list-ol"></i> TWO</li>
<li><i class="fa fa-users"></i> THREE</li>
</ul>
</section>
</nav>
<!-- Left Nav Sidebar -->
<div class="icon-bar vertical five-up">
<a class="item">
<i class="fa fa-home"></i>
<label>Home</label>
</a>
<a class="item">
<i class="fa fa-gamepad"></i>
<label>ONE</label>
</a>
<a class="item">
<i class="fa fa-star"></i>
<label>TWO</label>
</a>
<a class="item">
<i class="fa fa-thumbs-up"></i>
<label>THREE</label>
</a>
<a class="item">
<i class="fa fa-trophy"></i>
<label>FOUR</label>
</a>
</div>
I want to achieve:
Top Bar and Icon Bar the same
Content Area to be fixed and have large-8 or large-9
Sidebar to be fixed and have large-3
What I've already tried:
Was separating all 3 bits with div.large-1/8/3, nothing happened
Was nesting them into div.row
I think I've tried almost everything, but have no idea, what is the problem.
i had done the changes in html and css. this what your expecting
html code
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1>LOGO PLACEHOLDER</h1>
</li>
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li class="active"><i class="fa fa-diamond"></i> Go PRO</li>
<li class="has-dropdown">
<i class="fa fa-user"></i> My Account
<ul class="dropdown">
<li>Some Li's here</li>
</ul>
</li>
</ul>
<!-- Left Nav Section -->
<ul class="left">
<li><i class="fa fa-database"></i> ONE</li>
<li><i class="fa fa-list-ol"></i> TWO</li>
<li><i class="fa fa-users"></i> THREE</li>
</ul>
</section>
</nav>
<!-- Left Nav Sidebar -->
<div class="medium-1 columns left-nav">
<div class="icon-bar vertical five-up">
<a class="item">
<i class="fa fa-home"></i>
<label>Home</label>
</a>
<a class="item">
<i class="fa fa-gamepad"></i>
<label>ONE</label>
</a>
<a class="item">
<i class="fa fa-star"></i>
<label>TWO</label>
</a>
<a class="item">
<i class="fa fa-thumbs-up"></i>
<label>THREE</label>
</a>
<a class="item">
<i class="fa fa-trophy"></i>
<label>FOUR</label>
</a>
</div>
</div>
<div class="medium-8 columns content-area">content-area</div>
<div class="medium-3 columns sidebar">columns sidebar</div>
css code
.columns.content-area{border:1px solid #111;padding:0}
.columns.sidebar{border:1px solid #111;padding:0}
.columns.left-nav{padding:0}
.icon-bar.vertical.five-up{width:100%}
demo jsFiddle