adding vertical divider on main menu - html

How can I add vertical divider after the li element on the main menu?
<ul class="nav navbar-nav">
<li><i class="fa fa-home"></i> <span class="sr-only">(current)</span></li>
<li><a href="#" > نبذه عنا </a></li>
<li> اكادمية بوذيب للفروسيه </li>
<li> اسطابلات بوذيب </li>
<li> المركز الاعلامي </li>
<li> اتصل بنا </li>
<li> اكثر <i class="fa fa-bars"></i> </li>
<li> </li>
</ul>
This is the site I want to fix: the site
And this is the image I want the main menu to be like: the image
Can any one help me?

Although you could try this by giving border to sides, but nav items have more height than vertical line that you want to give, then you can try <pseudo:before> to achive this
.navbar-default .navbar-nav>li>a:after {
content: '';
display: inline-block;
position: absolute;
width: 1px;
background: #fff;
height: 30px;
right: 0;
top: calc(50% - 15px);
}
.navbar-default .navbar-nav>li:last-child>a:after,
.navbar-default .navbar-nav>li:first-child>a:after{
display:none;
}

Try this one
ul li{
float:left;
list-style:none;
padding:0 8px;
border-right:2px solid gray;
}
ul li:last-child{
border:none;
}
a{
text-decoration:none;
}
<ul class="nav navbar-nav">
<li><i class="fa fa-home"></i> <span class="sr-only">(current)</span></li>
<li><a href="#" > نبذه عنا </a></li>
<li> اكادمية بوذيب للفروسيه </li>
<li> اسطابلات بوذيب </li>
<li> المركز الاعلامي </li>
<li> اتصل بنا </li>
<li> اكثر <i class="fa fa-bars"></i> </li>
</ul>

Related

In iphone safari and chrome brower z-index is not working. background overlapping issue in side navbar

Screenshot
In my project I am facing a issue only on IOS mobile content of the page is overlapping over my navsidebar but working perfectly fine on other devices.
You can check the live url of my site below:
https://webapp.world
Attached CSS and Html code of my angular project for your reference
Thanks in advance.
.
.pushNav {
height: 100%;
position: fixed;
top: 0;
z-index: 10000;
overflow: hidden;
background: #2e2f35;
transition: ease-in-out 0.5s;
}
.pushNav hr {
border: 1px solid #555;
}
.pushNav,
.pushNav a {
font-size: 1rem;
font-family: helvetica, sens-serif;
font-weight: 100;
color: #fff;
text-decoration: none;
}
.pushNavIsOpen {
overflow: auto;
height: 100%;
}
.js-topPushNav.isOpen,
.pushNav_level.isOpen {
right: 0;
}
.closeLevel,
.openLevel {
cursor: pointer;
}
.openLevel,
.closeLevel,
.pushNav a {
padding: 1em 1em;
display: block;
text-indent: 5px;
transition: background 0.4s ease-in-out;
}
.openLevel:hover,
.closeLevel:hover,
.pushNav a:hover {
background: #494a50;
}
.openLevel span {
padding: 0 1rem;
}
.hdg {
background-color: #1e1e24;
}
.closeLevel,
closelevel > i {
font-size: 1em;
color: #a5a5a4;
}
.burger {
overflow: hidden;
text-align: end;
cursor: pointer;
background-color: #eeeded !important;
-webkit-transform: translate3d(0, 0, 1px);
transform: translate3d(0, 0, 1px);
z-index: 9;
transition: top 0.3s;
}
.burger i {
font-size: 2.5em;
color: #ae0000;
}
Angular html code
<nav>
<ul class="pushNav js-topPushNav">
<li class="closeLevel js-closeLevelTop hdg">
<!-- <i class="fa fa-close"></i> -->
<i class="bi bi-x-circle"></i>
</li>
<!-- company -->
<li>
<!-- Begin section 1 -->
<div class="openLevel js-openLevel">
<!-- <span> <i class="bi bi-gear-wide-connected"></i></span> -->
Services
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li>
<div class="openLevel js-openLevel">
Mobile App Development
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li class="closetab" style="background: #ae0000">
<a routerLink="mobile-app-development"
>Mobile App Development</a
>
</li>
<li>
<a routerLink="mobile-app-development/ios-application"
>iPhone App Development</a
>
</li>
<li>
<a routerLink="mobile-app-development/IOS-app-developmentq"
>Android App Development</a
>
</li>
<li>
<a routerLink="mobile-app-development/Flutter-app-development"
>Flutter App Development</a
>
</li>
</ul>
</li>
<li>
<div class="openLevel js-openLevel">
Web Development
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li class="closetab" style="background: #ae0000">
<a routerLink="web-app-development">Web Development</a>
</li>
<li>
<a routerLink="web-app-development/ReactJS-development"
>ReactJs Development</a
>
</li>
<li>
<a routerLink="web-app-development/Angular-development"
>Angular Development</a
>
</li>
<li>
<a routerLink="web-app-development/php-development"
>PHP Development</a
>
</li>
<li>
<a routerLink="web-app-development/laravel-development"
>Laravel Development</a
>
</li>
<li>
<a routerLink="web-app-development/NodeJS-development"
>NodeJs Development</a
>
</li>
<li>
<a routerLink="web-app-development/Python-Django-development">
Django/Python Development</a
>
</li>
</ul>
</li>
<li>
<div class="openLevel js-openLevel">
Game Development
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li class="closetab" style="background: #ae0000">
<a routerLink="game-app-development">Game Development</a>
</li>
<li>
<a routerLink="game-app-development/IOS-game-development"
>IOS Game Development</a
>
</li>
<li>
<a routerLink="game-app-development/Android-game-development"
>Android Game Development</a
>
</li>
</ul>
</li>
<li>
<div class="openLevel js-openLevel">
User Experience
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li style="background: #ae0000">
<a routerLink="user-experience">User Experience </a>
</li>
<li>
<a routerLink="user-experience/wireframe-design">Wireframe</a>
</li>
<li>
<a routerLink="user-experience/ui-ux-design">UI/UX Design</a>
</li>
</ul>
</li>
<li>
<div class="openLevel js-openLevel">
Latest Technologies
<i class="fa fa-chevron-right"></i>
</div>
<ul class="pushNav pushNav_level js-pushNavLevel">
<li class="closeLevel js-closeLevel hdg">
<i class="fa fa-chevron-left"></i>
Back
</li>
<li class="closetab" style="background: #ae0000">
<a routerLink="/latest-app-trends">Latest Technologies </a>
</li>
<li class="closetab">
<a routerLink="/latest-app-trends/IOT-development">IOT</a>
</li>
<li class="closetab">
<a routerLink="latest-app-trends/Blockchain-development"
>Blockchain</a
>
</li>
<li class="closetab">
<a routerLink="/latest-app-trends/augmented-virtual-Reality"
>AR/VR</a
>
</li>
</ul>
</li>
</ul>
</li>
<li class="">
<a
class="nav-link quote_btn"
[routerLink]="'/apply'"
routerLinkActive="active-link"
>Get Quote</a
>
</li>
</div>
</ul>
</nav>
Hey Use this Another Method
-webkit-transform: translate3d(0,0,1px);
transform: translate3d(0,0,1px);
TRY THIS
Z-index should be set for elements on the same level.
You should set the z-index on the parent's elements so that they will not be reset by their parent's z-index.
To fix your issue, you could set the z-index of #main-wrapper which is the parent of .pushNav to any number that is higher than <app-home>. Here's what I've tried on my device.

How can i make active background color for two elements in nav menu

I have a vertical navbar menu with 2 blocks.
First is nav with icons, second is text of menu.
They have a different background colors. How i can make one background color for two active nav blocks?
design of menu
<div class="menu__icons">
<ul class="menu__list">
<li>
<a class="menu__item" href="#"><img src="http://via.placeholder.com/50" alt=""></a>
</li>
<li>
<a class="menu__item" href="#"><img src="http://via.placeholder.com/50" alt=""></a>
</li>
<li>
<a class="menu__item" href="#"><img src="http://via.placeholder.com/50" alt=""></a>
</li>
<li>
<a class="menu__item" href="#"><img src="http://via.placeholder.com/50" alt=""></a>
</li>
</ul>
</div>
<div class="menu__text">
<ul class="menu__list">
<li><a class="menu__item" href="#">First</a></li>
<li><a class="menu__item" href="#">Second</a></li>
<li><a class="menu__item" href="#">Third</a></li>
<li><a class="menu__item" href="#">Fourth</a></li>
</ul>
</div>
</div>
https://jsfiddle.net/levan563/1g5ucmwq/2/
Well basically if you want to toggle .active and you don't want two separate markup of list.
Notice that font-awesome is for demonstration purposes only.
.menu__item {
width: 250px;
height: 50px;
text-align: left;
}
.menu__item.active {
background-color: #e9ebfd;
}
.menu__item.active .menu__icon {
background-color: #e9ebfd;
border-left: 4px solid #2c39ec;
}
.menu__item.active .menu__title {
background-color: #e9ebfd;
}
.menu__item a:hover {
text-decoration: none;
}
.menu__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
background-color: #fafafa;
color: #2c39ec;
}
.menu__title {
display: inline-block;
padding-left: 20px;
color: #777777;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navigation-menu">
<ul class="menu__list list-unstyled">
<li class="menu__item active">
<a href="#">
<div class="menu__icon">
<i class="fa fa-tachometer-alt"></i>
</div>
<div class="menu__title">Main Dashboard</div>
</a>
</li>
<li class="menu__item">
<a href="#">
<div class="menu__icon">
<i class="fa fa-user"></i>
</div>
<div class="menu__title">Profile</div>
</a>
</li>
<li class="menu__item">
<a href="#">
<div class="menu__icon">
<i class="fa fa-bell"></i>
</div>
<div class="menu__title">Finances</div>
</a>
</li>
<li class="menu__item">
<a href="#">
<div class="menu__icon">
<i class="fa fa-calendar"></i>
</div>
<div class="menu__title">Titles</div>
</a>
</li>
</ul>
</nav>
Related Fiddle https://jsfiddle.net/mhrabiee/dojL9get/28/
As I understand take active class for both block's li and try to use font, svg icon or transparent background images instead of block images
.menu__list .active {
background-color: red;
}
<div class="menu__icons">
<ul class="menu__list">
<li><a class="menu__item active" href="#">
<img src="https://img.icons8.com/material/24/000000/tailoring-for-men.png">
</a></li>
</ul>
</div>
<div class="menu__text">
<ul class="menu__list">
<li><a class="menu__item active" href="#">First</a></li>
</ul>
</div>
Its doable using jQuery.
Assuming you have same number of list items in both blocks,
$(function(){
$('.menu__list li').on('click', function() {
var idx = $(this).index();
$('.menu__list li').removeClass('active');
$('.menu__list li:nth-child(' + idx + ')').addClass('active');
});
});
also add .active class in css and give needed style to li items also
.active{
/**your style**/
}
.active > a{
}
.active img{
}

Can't Fix The hover of my Navbar

I could't fix the hover of my nav bar to fulrange the hole Square on my Li elements,here is my code so you can understand me ,Please help.
I could't fix the hover of my nav bar to fulrange the hole Square on my Li elements,here is my code so you can understand me ,Please help.
https://jsfiddle.net/h41zhwrx/
<body>
<!** Social Media Icons**>
<div class='social-wrap'>
<ul>
<li><a class='facebook1' href='http://www.facebook.com/username' target='_blank' title='Facebook' rel='nofollow'></a></li>
<li><a class='twitter1' href='http://twitter.com/username' target='_blank' title='Twitter' rel='nofollow'></a></li>
<li><a class='google-p1' href='https://plus.google.com/b/username' target='_blank' title='Google Plus' rel='nofollow'></a></li>
<li><a class='rss1' href='http://feeds.feedburner.com/username' target='_blaank' title='RSS Feed' rel='nofollow'></a></li>
<li><a class='pinit1' href='http://www.pinterest.com/username' target='_blank' title='Pinterest' rel='nofollow'></a></li>
<li><a class='linkdin1' href='http://www.linkedin.com/in/username' target='_blank' title='Linkedin' rel='nofollow'></a></li>
</ul>
</div>
<!**my top bar space**>
<ul class="topnav" id="myTopnav">
<li>
</li>
<li class="icon">
</li>
</ul>
<div class="banner">
<img class="banner-image" src="img/banner.jpg" alt="Make Image responsive" >
</div>
<!** My nav bar space**>
<ul class="nav">
<li class="icon">
☰
</li>
<li> DIGITAL </li>
<li> ANALYSES </li>
<li> CRÉATIVITÉ </li>
<li> TECHNOLOGIE </li>
<li> ÉVÉNEMENT </li>
<li> EMPLOI </li>
<li> CONTACT </li>
</ul>
<div class="footer">Dzair Tic Tous droits réservés ©2017.</div>
</body>
.nav {
font-family: 'arial', serif;
margin-top: 0;
background-color: #1f5d86;
Color: #ffffff;
list-style: none; /* Na7i boutton ta3 la liste */
text-align: center;
opacity: 0.9;
}
.nav > li {
display: inline-block;
padding: 15px 20px;
font-size: auto ;
}
Just replace these 2 classes in css

Placing glyph icon next to nav stacked items

I have a nav stacked list with checks in it like below. Is there any way I can move the checks to the right or left of the items so when the items are active they don't cover up the check?
Here is my fiddle
<ul class="nav nav-pills">
<li role="presentation" class="active">Home <i class="glyphicon glyphicon-ok pull-right"></i>
</li>
<li role="presentation">Profile <i class="glyphicon glyphicon-ok pull-right"></i>
</li>
<li role="presentation">Messages <i class="glyphicon glyphicon-ok pull-right"></i>
</li>
</ul>
Change the markup a bit, move it outside the anchor.
<ul class="nav nav-pills nav-stacked">
<li role="presentation" class="active">
Home
<i class="glyphicon glyphicon-ok pull-right"></i>
</li>
<li role="presentation">
Other
<i class="glyphicon glyphicon-ok pull-right"></i>
</li>
</ul>
.nav .active {
overflow: hidden;
}
.nav .active a {
width: 80%;
float: left;
}
.nav i {display:none;}
.nav .active i {
margin: 12px 14px 0 0;
display: block;
}
EDIT: Fiddle
You could alternatively add a white (or different colored) background to the checkmark when it's active by adding the following CSS:
.nav-pills>li.active>a i {
color: green;
background: #fff;
padding: 0.25rem;
border-radius: 0.5rem;
}
https://jsfiddle.net/karolbrennan/uc5xfsso/

Bootstrap nav dropdown direction

I'm using Twitter Bootstrap to built a layout. I'm having trouble with the positioning the dropdown in the navbar. If the .nav has pull-right, the dropdown that opens will always open to the left.
I want to be able to manually control whether it should open to the left or right. Is this possible?
<div class="navbar" id="navbar-top">
<div class="navbar-inner">
<div class="container">
<a class="logo pull-left" href="/index_dev.php/"></a>
<ul class="nav pull-right">
<li class="active"> Shots</li>
<li class="divider-vertical"></li>
<li class="dropdown">
Explore <i class="icon-caret-down"></i>
<ul class="dropdown-menu span6">
<li class="column-menu span2">
<ul>
<li><i class="icon-caret-right"></i> Dry Fly</li>
<li><i class="icon-caret-right"></i> Popper</li>
<li><i class="icon-caret-right"></i> Terrestrial</li>
<li><i class="icon-caret-right"></i> Streamer</li>
</ul>
</li>
<li class="column-menu span2">
<ul>
<li><i class="icon-caret-right"></i> Wet Fly</li>
<li><i class="icon-caret-right"></i> Nymph</li>
<li><i class="icon-caret-right"></i> Emerger</li>
<li><i class="icon-caret-right"></i> Streamer</li>
</ul>
</li>
<li class="column-menu span2">
<ul>
<li><i class="icon-caret-right"></i> Wet Fly</li>
<li><i class="icon-caret-right"></i> Nymph</li>
<li><i class="icon-caret-right"></i> Emerger</li>
</ul>
</li>
</ul>
</li>
<li class="divider-vertical"></li>
<li>Sign up</li>
<li class="divider-vertical"></li>
<li>Sign in</li>
</ul>
</div>
</div>
</div>
You just need to override Bootstrap's .dropdown-menu.pull-right styles:
.navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right.dropdown-right {
right: auto;
left: -19px;
}
.navbar .pull-right > li > .dropdown-menu::before, .navbar .nav > li > .dropdown-menu.pull-right.dropdown-right::before {
right: auto;
left: 9px;
}
.navbar .pull-right > li > .dropdown-menu::after, .navbar .nav > li > .dropdown-menu.pull-right.dropdown-right::after {
right: auto;
left: 10px;
}
Use the class dropdown-right in any right-pulled menu you'd like to override.
jsFiddle