I have had many attempts but I have failed on all attempts, This is my code I've created but I cannot find a way to center my navigation bar. Here is my code
<div id="nav">
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>About</li>
<li>Models
<ul>
<li>Lite</li>
<li>Domestic</li>
<li>Regional</li>
<li>Continental</li>
<li></li>
</ul>
</li>
<li>Benefits</li>
<li>Extras</li>
<li>Technical</li>
<li>Other Products
<ul>
<li>EMA Loader</li>
<li>Portable Airstairs</li>
</ul>
</li>
<li>Testimonials</li>
<li>FAQ's</li>
</ul>
</nav>
</div>
<style type="text/css">
#primary_nav_wrap {
margin-top: 15px;
}
#primary_nav_wrap ul {
list-style: none;
position: relative;
padding: 0
}
#primary_nav_wrap ul a {
display: block;
color: #333;
text-decoration: none;
font-weight: 700;
font-size: 13px;
line-height: 32px;
padding: 0 15px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin-right: auto;
margin-left: auto;
padding: 0
}
#primary_nav_wrap ul li.current-menu-item {
background: #ddd
}
#primary_nav_wrap ul li:hover {
background: #75D1FF;
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px
}
</style>
Please try and help me as the website I'm making requires the nav bar to be in the center
Please find the updated code, it works well for me, hope it will resolve your issue.
<div id="nav">
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>About</li>
<li>Models
<ul>
<li>Lite</li>
<li>Domestic</li>
<li>Regional</li>
<li>Continental</li>
<li></li>
</ul>
</li>
<li>Benefits</li>
<li>Extras</li>
<li>Technical</li>
<li>Other Products
<ul>
<li>EMA Loader</li>
<li>Portable Airstairs</li>
</ul>
</li>
<li>Testimonials</li>
<li>FAQ's</li>
</ul>
</nav>
</div>
<style type="text/css">
#primary_nav_wrap {
margin-top: 15px;
text-align:center;
}
#primary_nav_wrap ul {
list-style: none;
position: relative;
padding: 0;
margin:0px auto;
display:inline-block;
}
#primary_nav_wrap ul a {
display: block;
color: #333;
text-decoration: none;
font-weight: 700;
font-size: 13px;
line-height: 32px;
padding: 0 15px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin-right: auto;
margin-left: auto;
padding: 0
}
#primary_nav_wrap ul li.current-menu-item {
background: #ddd
}
#primary_nav_wrap ul li:hover {
background: #75D1FF;
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px
}
</style>
Here are two lines to add to your css:
#primary_nav_wrap {
margin-top: 15px;
width: 800px;
margin: 0 auto;
}
adding the width and margin: 0 auto will help you. Only adding the margin: 0 auto will not work it needs the width to work.
Simple solution:
#nav{
width:100%;
text-align:center;
}
#primary_nav_wrap {
margin: 15px auto 0 auto;
width:780px;
}
http://jsfiddle.net/e8rqxbe5/1/
Other solution is:
#primary_nav_wrap {
display: table;
margin: 0 auto;
margin: 15px auto 0 auto;
}
#primary_nav_wrap ul {
display: table-cell;
list-style: none;
position: relative;
padding: 0;
}
http://jsfiddle.net/u5xko1dn/1/
#nav{
width:100%;
text-align:center;
}
#primary_nav_wrap {
margin-top: 15px;
}
#primary_nav_wrap ul {
list-style: none;
position: relative;
padding: 0
}
#primary_nav_wrap ul a {
display: block;
color: #333;
text-decoration: none;
font-weight: 700;
font-size: 13px;
line-height: 32px;
padding: 0 15px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin-right: auto;
margin-left: auto;
padding: 0
}
#primary_nav_wrap ul li.current-menu-item {
background: #ddd
}
#primary_nav_wrap ul li:hover {
background: #75D1FF;
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px
}
/* center */
#primary_nav_wrap {
display: -webkit-flex;
display: flex;
-webkit-justify-content: center;
justify-content: center;
-webkit-align-items: center;
align-items: center;
//width: 100%;
//height: auto;
//background-color: lightgrey;
}
ul {
//background-color: cornflowerblue;
//padding: 1rem;
//margin: 1rem;
-webkit-align-self: center;
align-self: center;
}
/* || center */
<div id="nav">
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>About</li>
<li>Models
<ul>
<li>Lite</li>
<li>Domestic</li>
<li>Regional</li>
<li>Continental</li>
<li></li>
</ul>
</li>
<li>Benefits</li>
<li>Extras</li>
<li>Technical</li>
<li>Other Products
<ul>
<li>EMA Loader</li>
<li>Portable Airstairs</li>
</ul>
</li>
<li>Testimonials</li>
<li>FAQ's</li>
</ul>
</nav>
</div>
Related
I am very new to programming and am working on a website as a project for a class. I am attempting to create a drop down menu, but I continually run into an issue where my links in the drop down sub-menu are not taking up the full width I would like. See the pic below.
https://i.stack.imgur.com/u6koe.png
I would like the link and thus the hovered white background to extend the full width of the sub-menu but I cannot figure out how to make it work.
Here is my HTML:
<header id="mainheader">
<nav>
<ul id="menu">
<li>About Me</li>
<li>Creativity
<ul class="submenu">
<li>Skiing</li>
<li>Island</li>
<li>Cooking</li>
</ul>
</li>
<li>Revisions</li>
</ul>
</nav>
</header>
Here is my CSS:
body {
margin-top: 0px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin-left: auto;
margin-right: auto;
background-color: aquamarine;
}
#mainheader {
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #818181;
text-align: center;
}
#menu {
padding: 0;
margin: 0;
}
#menu li {
display: inline-block;
list-style: none;
padding-top: 10px;
padding-bottom: 10px;
position: relative;
}
#menu li a {
text-decoration: none;
font-weight: bold;
color: white;
padding: 10px 30px;
}
#menu li a:hover {
background-color: white;
color: black;
}
#menu li ul.submenu {
height: auto;
width: 133px;
background: #818181;
position: absolute;
display: none;
padding: 0;
margin-top: 10px;
}
#menu li:hover ul.submenu {
display: block;
}
#menu li ul.submenu li {
width: 133px;
}
#menu li ul.submenu li a {
text-decoration: none;
padding: 10px 0px;
}
Any assistance is appreciated.
Add display: inline-block; and width: 100%; to your #menu li ul.submenu li a css rule.
body {
margin-top: 0px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin-left: auto;
margin-right: auto;
background-color: aquamarine;
}
#mainheader {
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #818181;
text-align: center;
}
#menu {
padding: 0;
margin: 0;
}
#menu li {
display: inline-block;
list-style: none;
padding-top: 10px;
padding-bottom: 10px;
position: relative;
}
#menu li a {
text-decoration: none;
font-weight: bold;
color: white;
padding: 10px 30px;
}
#menu li a:hover {
background-color: white;
color: black;
}
#menu li ul.submenu {
height: auto;
width: 133px;
background: #818181;
position: absolute;
display: none;
padding: 0;
margin-top: 10px;
}
#menu li:hover ul.submenu {
display: block;
}
#menu li ul.submenu li {
width: 133px;
}
#menu li ul.submenu li a {
text-decoration: none;
padding: 10px 0px;
display: inline-block;
width: 100%;
}
<header id="mainheader">
<nav>
<ul id="menu">
<li>About Me</li>
<li>Creativity
<ul class="submenu">
<li>Skiing</li>
<li>Island</li>
<li>Cooking</li>
</ul>
</li>
<li>Revisions</li>
</ul>
</nav>
</header>
What I'm looking for:
/
What I've got:
I want to include small vertical lines, evenly spaced with matching color, in between the links in my navbar. Below is the CSS code I've written. I'm new to coding and I've searched Google but I keep seeing the same answer which got me these huge lines that I don't want. ???
/* GLOBAL */
body {
margin: 0 auto;
background: grey;
font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 300;
}
/* NAVBAR */
header {
background: #ffffff;
max-width: 100%;
border-bottom: 2px solid #777777;
}
header::after {
content: '';
display: table;
clear: both;
}
.container {
margin: 0 auto;
max-width: 960px;
}
.logo {
float: left;
background-color: #4aaaa5;
color: #ffffff;
margin: 0;
padding: 20px 30px;
display: inline-block;
font-family: 'Georgia', Times, 'Times New Roman', serif;
}
nav {
float: right;
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
}
nav li {
display: inline-block;
padding-top: 30px;
margin-left: 20px;
**border-right: 1px solid #777777;**
}
nav a {
color: #777777;
text-decoration: none;
}
nav li:last-of-type {
**border-right: none;**
}
nav a:hover {
color: #4aaaa5;
}
===========================================================================
<body>
<header>
<div class="container">
<h1 class="logo">Name</h1>
<nav>
<ul>
<li><a class="active" href="about.html">About</a></li>
<li>Portfolio</li>
<li>Content</li>
</ul>
</nav>
</div>
</header>
</body>
You can consider using pseudo elements. That'll do the trick.
Have a look at this
ul {
list-style:none;
}
ul li{
display:inline-block;
padding:0 7px;
position:relative;
}
ul li:not(:last-child)::after{
content:"";
border:1px solid #e2e2e2;
border-width: 1px 1px 0 0;
position:absolute;
right:-3px;
top:0;
height:100%;
}
<ul>
<li>Home</li>
<li>Portfolio</li>
<li>Contact</li>
</ul>
Try adding the border-right to each li tag except the last li tag. And add padding to the each li tag.
like the below code
.nav li{
border-right: 2px solid #c4c4c4;
display: inline-block;
float: left;
padding: 0 15px;
}
.nav li:last-child {
border-right:0;
}
Below is the full working demo here. Hope it helps you.
.nav{
list-style: none;
padding: 0;
margin: 0;
margin-top: 25px;
float: left;
}
.nav li{
border-right: 2px solid #c4c4c4;
display: inline-block;
float: left;
padding: 0 15px;
}
.nav li:last-child {
border-right:0;
}
<ul class="nav">
<li>About</li>
<li>Home</li>
<li>Contact</li>
</ul>
You can do this by using border-right or the way below.
.nav{
list-style: none;
padding: 0;
margin: 0;
margin-top: 25px;
float: left;
}
.nav li{
display: inline-block;
position: relative;
float: left;
padding: 0 15px;
}
.nav li::after {
position: absolute;
width: 2px;
right: 0;
content: ' ';
height: 100%;
background: rgba(0, 0, 0, 0.2);
}
.nav li:last-child::after {
width: 0;
}
<ul class="nav">
<li>About</li>
<li>Home</li>
<li>Contact</li>
</ul>
working demo
<ul class="nav">
<li>About</li>
<li>Home</li>
<li>Contact</li>
</ul>
.nav{
list-style: none;
padding: 0;
margin: 0;
margin-top: 25px;
float: left;
}
nav li {
display: inline-block;
padding-top: 30px;
padding-left:10px
padding-right:10px;
}
.nav li:after{
content:'|';
display:inline-block;
color:#dddddd;
vertical-align:middle;
}
.nav li:last-child:after {
display:none;
}
Add the separator image as a background image on the li.
#nav li + li {
background:url('seperator.gif') no-repeat top left;
padding-left: 10px
}
I'm making a simple website and I'm struggling one one thing...
Exactly, it's a menu navbar.
I've done it, but it's only positioning in left corner. What I want to do is to continue the color strip (#333) to the very end of the screen.
Here is the code:
#primary_nav_wrap {
margin: 0;
float: left;
}
#primary_nav_wrap ul {
background-color: #333;
list-style: none;
position: relative;
float: left;
margin: 0;
padding: 0;
}
#rectangle {
float: right;
position: relative;
width: 1200px;
overflow: hidden;
background: #333;
}
#primary_nav_wrap ul a {
display: block;
color: #fff;
text-decoration: none;
font-weight: 500;
line-height: 50px;
padding: 0 20px;
font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin: 0;
padding: 0
}
#primary_nav_wrap ul li.current-menu-item {
background: #4CAF50
}
#primary_nav_wrap ul li:hover {
background: #282828
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #333;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px
}
#primary_nav_wrap ul ul ul {
top: 0;
left: 100%
}
#primary_nav_wrap ul li:hover>ul {
display: block
}
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>Portfolio
<ul>
<li>About me</li>
<li>Menu1</li>
<li>MenuMenu</li>
<li>MenuMenuMenu</li>
</ul>
<li>Menu2</li>
<li>Menu3
<ul>
<li>MenuMenuMenu</li>
<li>MenuMenu</li>
<li>MenuMenuMenu</li>
<li>MenuMenuMenu</li>
<li>MenuMenu</li>
<li>Menu</li>
<li>WutWut</li>
</ul>
</li>
<li>Contact</li>
</ul>
<!--
<div id="rectangle"></div>
-->
</nav>
I am still learning CSS, HTML and JS and this is my first attempts... Some code are mine, some not, but hey.. I'm trying to learn :)
The struggle is to continue menu background color (#333) to the end of the right side. As you can see I was trying to do that using a rectangle (do not kill me for that, please) and didn't worked out properly, ofc...
Help :(
#primary_nav_wrap {
width: 100%;
background:#333;
}
Just give 100% width and color the background
Simply set the width as 100% to #primary_nav_wrap and #primary_nav_wrap ul.
#primary_nav_wrap {
margin: 0;
float: left;
width: 100%;
}
#primary_nav_wrap ul {
background-color: #333;
list-style: none;
position: relative;
float: left;
margin: 0;
padding: 0;
width: 100%;
}
#rectangle {
float: right;
position: relative;
width: 1200px;
overflow: hidden;
background: #333;
}
#primary_nav_wrap ul a {
display: block;
color: #fff;
text-decoration: none;
font-weight: 500;
line-height: 50px;
padding: 0 20px;
font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif
}
#primary_nav_wrap ul li {
position: relative;
float: left;
margin: 0;
padding: 0
}
#primary_nav_wrap ul li.current-menu-item {
background: #4CAF50
}
#primary_nav_wrap ul li:hover {
background: #282828
}
#primary_nav_wrap ul ul {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #333;
padding: 0
}
#primary_nav_wrap ul ul li {
float: none;
width: 200px
}
#primary_nav_wrap ul ul a {
line-height: 120%;
padding: 10px 15px
}
#primary_nav_wrap ul ul ul {
top: 0;
left: 100%
}
#primary_nav_wrap ul li:hover>ul {
display: block
}
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>Portfolio
<ul>
<li>About me</li>
<li>Menu1</li>
<li>MenuMenu</li>
<li>MenuMenuMenu</li>
</ul>
<li>Menu2</li>
<li>Menu3
<ul>
<li>MenuMenuMenu</li>
<li>MenuMenu</li>
<li>MenuMenuMenu</li>
<li>MenuMenuMenu</li>
<li>MenuMenu</li>
<li>Menu</li>
<li>WutWut</li>
</ul>
</li>
<li>Contact</li>
</ul>
<!--
<div id="rectangle"></div>
-->
</nav>
I have horizontal menu bar, and I trying to add sub menu for one of item, but I am not able to add it, Its appending to my main menu, please someone help me to where i missing
thanks
HTML
<div id="talltabs-maroon">
<ul>
<li class="first">Home <span>Page</span></li>
<li class="active"><span>About us</span></li>
<li class="dropdown"><a class="dropbtn" href="#"> <span> Report </span></a>
<ul class="dropdown-content" style="left:0">
<li>
<a href="">
<p>Valve Report</p>
</a>
</li>
<li>
<a href="">
<p>Cylinder Report</p>
</a>
</li>
</ul>
</li>
<li class="last">Contact <span>Us</span></li>
</ul>
</div>
CSS for Main menu
#talltabs-maroon {
clear: left;
float: left;
padding: 0;
border-top: 3px solid #CD324F;
width: 100%;
overflow: hidden;
font-family: Georgia, serif;
height: 90px;
position: inherit;
}
#talltabs-maroon ul {
float: left;
margin: 0;
padding: 0;
list-style: none;
position: relative;
left: 50%;
text-align: center;
}
#talltabs-maroon ul li {
display: block;
float: left;
list-style: none;
margin: 0;
padding: 0;
position: relative;
right: 50%;
}
#talltabs-maroon ul li a {
display: block;
float: left;
margin: 0 3px 0 0;
padding: 0px 10px 6px 10px;
background: #CD324F;
text-decoration: none;
color: #fff;
}
#talltabs-maroon ul li a p:hover {
color: aqua;
}
#talltabs-maroon ul li a:hover {
padding: 20px 10px 6px 10px;
color: black
}
#talltabs-maroon ul li.active a,
#talltabs-maroon ul li.active a:hover {
padding: 25px 10px 6px 10px;
border-width: 5px;
border-color: aqua;
color: aqua;
}
CSS for drop down menu i tried.
.dropbtn {
list-style-type: none;
color: white;
padding: 14px;
font-size: 14px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: block;
}
.dropdown-content {
list-style-type: none;
display: none;
position: absolute;
right: 0;
/*background-color: black;*/
background-image: url('../../Images/black-olive.jpg'); /*dropdowm popup*/
min-width: 160px;
box-shadow: 0px 8px 16px 5px rgba(0,0,0,0.2);
z-index: 1;
padding-right: 2px;
margin-right: 2px;
}
.dropdown-content a {
color: white;
padding: 10px 14px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
/*background-color: gray;*/
color: black;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
/*background-color: #3e8e41;*/
}
pleas help me.
thanks
tink.
Here is my answer for same example, I changed complete css,
body {
font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
ul {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
list-style: none;
}
ul li {
display: inline-block;
margin-right: -1px;
position: relative;
padding: 15px 20px;
background: #CD324F;
cursor: pointer;
color: black;
height: 40px;
width: auto;
text-align:center;
}
ul li a{
color:black;
}
ul li:hover {
background: #CD324F;
color: #fff;
height: 45px;
}
ul li a:hover {
color: #fff;
}
ul li ul {
padding: 0;
position: absolute;
top: 68px;
left: 0;
width: 160px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
}
ul li ul li {
background: #ce5068;
display: block;
color: #CD324F;
height: 35px;
}
ul li ul li:hover {
background: #CD324F;
height: 35px;
}
ul li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
<div style="height: 77px; width:100%; margin-top:65px;text-align:center; border-top:solid; border-top-color:#CD324F">
<ul><li>Home</li>
<li>About</li>
<li>
Portfolio
<ul>
<li>Web Design</li>
<li>Web Development</li>
<li>Illustrations</li>
</ul>
</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</div>
Result: on hover portfolio, drop down will appear
Working example on JSFiddle.
I really recommend to look at bootstrap's drop down menu. It is easy to use and most things are already done for you. good luck
Here is the link: https://www.w3schools.com/bootstrap/bootstrap_dropdowns.asp
your code is bit confusing , i have created a simple demo for you how to do it.
here is my HTML code
body {
background: #212121;
font-size:22px;
line-height: 32px;
color: #ffffff;
word-wrap:break-word !important;
font-family: 'Open Sans', sans-serif;
}
h1 {
font-size: 60px;
text-align: center;
color: #FFF;
}
h3 {
font-size: 30px;
text-align: center;
color: #FFF;
}
h3 a {
color: #FFF;
}
a {
color: #FFF;
}
h1 {
margin-top: 100px;
text-align:center;
font-size:60px;
font-family: 'Bree Serif', 'serif';
}
#container {
margin: 0 auto;
}
p {
text-align: center;
}
nav {
margin: 50px 0;
background-color: #E64A19;
}
nav ul {
padding: 0;
margin: 0;
list-style: none;
position: relative;
}
nav ul li {
display:inline-block;
background-color: #E64A19;
}
nav a {
display:block;
padding:0 10px;
color:#FFF;
font-size:20px;
line-height: 60px;
text-decoration:none;
}
nav a:hover {
background-color: #000000;
}
/* Hide Dropdowns by Default */
nav ul ul {
display: none;
position: absolute;
top: 60px; /* the height of the main nav */
}
/* Display Dropdowns on Hover */
nav ul li:hover > ul {
display:inherit;
}
/* Fisrt Tier Dropdown */
nav ul ul li {
width:170px;
float:none;
display:list-item;
position: relative;
}
<div id="container">
<nav>
<ul>
<li>Home</li>
<li>WordPress
<!-- First Tier Drop Down -->
<ul>
<li>Themes</li>
<li>Plugins</li>
<li>Tutorials</li>
</ul>
</li>
<li>Web Design
<!-- First Tier Drop Down -->
<ul>
<li>Resources</li>
<li>Links</li>
<li>Tutorials
</ul>
</nav>
</div>
Hello Mates,
I'm trying to build a CSS menu that is displayed above. So far I wrote this HTML:
<div class="left-menu">
<ul class="menu-left">
<li id="current" class="parent active item5">
<span>ღვინო</span>
<ul>
<li class="parent item6">
<span>TELIANI VALLEY</span>
<ul>
<li class="item7">
<span>ლეგენდა</span>
</li>
<li class="item8">
<span>ღვინოები</span>
</li>
<li class="item9">
<span>ჯილდოები</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
and this is my CSS:
/* 1 */
.left-menu ul {
width: 145px;
margin: 0;
padding: 0;
list-style: none;
}
.left-menu ul li {
list-style: none;
margin: 0;
padding: 0;
}
.left-menu ul li {
width: 145px;
margin: 0;
padding: 0;
height: 20px;
background:#fff;
}
.left-menu ul li a {
width:131px;
height:20px;
padding-left: 14px;
float: left;
font: normal 12px calibri, sylfaen, georgia, arial, verdana;
color: #7b2029; text-decoration: none;
}
.left-menu ul li:hover, .left-menu ul li#current {
width: 145px;
height: 20px;
color:#fff;
text-decoration: none;
}
.left-menu ul li#current a {
width: 131px;
height: 20px;
padding-left: 14px;
color: #fff;
text-decoration: none;
background: #7b2029;
display:block;
}
/* 2 */
.left-menu ul li ul {
width:145px;
padding:0;
margin: 2px 0 0 0;
float: left;
list-style: none;
}
.left-menu ul li ul li {
width: 137px;
margin: 0;
padding: 0;
height: 20px;
list-style: none;
padding-left: 8px;
}
.left-menu ul li ul li a {
width: 120px;
height: 20px;
padding-top: 0px;
font: normal 12px/20px calibri, sylfaen, georgia, arial, verdana;
background:#887b33;
}
/* 3 */
and I'm getting displayed this crap:
Can someone tell me why? I haven't experience such thing before...
Link to example fiddle I have created:
Fiddle...
I didn't bother with hover effects, and colors/font styles. You can always change it...
Tested on mozilla and IE (ain't got chrome at work).
I hope it helps.
Daniel