How to create a custom navigation bar with dropdown menus - html

I have this design
However I'm having a lot of trouble creating the navigation bar. Up to now, this is what I've achieved:
How can I make the green color to "cover" all of the list element when I hover on it? As you can see, it is not covering its full width neither its full height. I have tried modifying padding and margin but with no success.
Also, how can I prevent this dropdown menu to overlap from the "CATALOGO" list element? And why is the green color not appearing when I hover on it?
My jade file is:
ul
li
a(href="/Catalogo") CATÁLOGO
ul(class="dropdown")
li
a(href="/Metoods") MÉTODOS
li
a(href="/Recursos") RECURSOS
li
a(href="/Noticias") NOTICIAS
li
a(href="/Proyectos") PROYECTOS
li
a(href="/Eventos") EVENTOS
li
a(href="/Acerca de") ACERCA DE
li
a(href="/Contacto") CONTACTO
And CSS:
ul{
list-style: none;
background: white;
opacity: 0.8;
position: absolute;
top: 18%;
left: 1.6%;
width: 96.5%;
-webkit-box-shadow: 0 0 10px #aeaeae;
-moz-box-shadow: 0 0 10px #aeaeae;
box-shadow: 0 0 10px #aeaeae;
}
ul li{
padding: 0.6%;
display: inline-block;
position: relative;
text-align: center;
width: 16.6579%;
}
ul li a{
margin: 0;
padding: 0.6%;
display: block;
color: #333;
text-decoration: none;
}
ul li a:hover{
margin: 0;
padding-top: 0.6%;
color: white;
background-color: #0CBCAF;
-webkit-box-shadow: 0 0 0px #aeaeae;
-moz-box-shadow: 0 0 0px #aeaeae;
box-shadow: 0 0 0px #aeaeae;
}
ul li ul.dropdown{
min-width: 18%;
background: white;
display: none;
position: absolute;
z-index: 999;
left: 0;
-webkit-box-shadow: 0 0 0px #aeaeae;
-moz-box-shadow: 0 0 0px #aeaeae;
box-shadow: 0 0 0px #aeaeae;
}
ul li:hover ul.dropdown{
display: block;
}
ul li ul.dropdown li{
display: block;
}
Thanks in advance. :)

The li has padding so when you hover the anchor its background color wont
fill the parents li.
The dropdown will need a position from the top of the li so as not
to overlap its parent element.
ul{
list-style: none;
background: white;
opacity: 0.8;
position: absolute;
top: 18%;
left: 1.6%;
width: 96.5%;
-webkit-box-shadow: 0 0 10px #aeaeae;
-moz-box-shadow: 0 0 10px #aeaeae;
box-shadow: 0 0 10px #aeaeae;
}
ul li{ /* REMOVE THE PADDING FROM THE LI */
display: inline-block;
position: relative;
text-align: center;
width: 16.6579%;
}
ul li a{
margin: 0;
padding: 1.2%; /* ADD THIS .6% PADDING TO THE CURRENT LI A PADDING */
display: block;
color: #333;
text-decoration: none;
}
ul li a:hover{
margin: 0;
padding-top: 0.6%;
color: white;
background-color: #0CBCAF;
-webkit-box-shadow: 0 0 0px #aeaeae;
-moz-box-shadow: 0 0 0px #aeaeae;
box-shadow: 0 0 0px #aeaeae;
}
ul li ul.dropdown{
min-width: 18%;
background: white;
display: none;
position: absolute;
z-index: 999;
left: 0;
top: 100%; /* ADD TOP POSITION FOR THE DROPDOWN */
-webkit-box-shadow: 0 0 0px #aeaeae;
-moz-box-shadow: 0 0 0px #aeaeae;
box-shadow: 0 0 0px #aeaeae;
}
ul li:hover ul.dropdown{
display: block;
}
ul li ul.dropdown li{
display: block;
}

For reference: background-color ends at the edge of the border, before the outline and margin.
div {
background-color: red;
width: 100px;
height: 30px;
margin: 0;
padding: 0;
border: 0;
}
#a {
padding: 10px;
}
#b {
border: 10px solid rgba(0, 0, 255, 0.5);
}
#c {
margin: 10px;
outline: 5px solid rgba(0, 0, 255, 0.5);
}
<div id="a">Sample div</div>
<br />
<div id="b">Sample div</div>
<br />
<div id="c">Sample div</div>

Related

Menu items move when hover

the menu for my website has some issues. When i hover an item from the "first level", the other items around get closer. But the fact is that the menu works perfectly on Firefox, but has issues on IE and chrome. There is the fiddle : https://jsfiddle.net/sxfxjja5/ and the CSS:
#menu{
width: 57%;
-webkit-width:60%;
margin-left: 22%;
-webkit-height:15%;
-webkit-margin-left:18%;
margin-top: 0%;
padding: 10px 0 0 0;
-webkit-padding:15px 0 0 0;
list-style: none;
background: linear-gradient(green, white);
height: 5%;
-moz-border-radius: 50px;
-webkit-border-radius:50px;
border-radius: 50px;
-moz-box-shadow: 0 2px 1px white;
-webkit-box-shadow: 0 2px 1px white;
box-shadow: 0 2px 1px white;
position:absolute;
z-index: 22;
}
#menu li{
float: left;
padding: 0 0 10px 0;
-webkit-padding:0 0 20px 0;
position: relative;
}
#menu a{
float: left;
-webkit-width: 100%;
padding: 0 20%;
-webkit-padding-left:20%;
color: antiquewhite; /*couleur police onglets lvl 1 */
text-transform: uppercase;
font: bold 77%/25px Arial, Helvetica;
width: 100%;
text-decoration: none;
text-shadow: 0 1px 0 #000;
}
#menu li:hover > a{
color: green;
}
#menu li:hover > ul{
display: block;
}
/* Sous-menu */
#menu ul{
list-style: none;
margin: 0;
padding: 0;
display: none;
position: absolute;
top: 35px;
z-index: 99999;
background: linear-gradient(#444, #111);
-moz-border-radius: 5px;
border-radius: 5px;
}
#menu ul li{
float: none;
margin: 0;
padding: 0;
display: block;
-moz-box-shadow: 0 1px 0 #111111, 0 2px 0 #777777;
-webkit-box-shadow: 0 1px 0 #111111, 0 2px 0 #777777;
box-shadow: 0 1px 0 #111111, 0 2px 0 #777777;
}
#menu ul li:last-child{
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#menu ul a{
padding: 10px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
#menu ul a:hover{
background: linear-gradient(white, green);
}
#menu ul li:first-child a{
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
/*Le petit triangle */
#menu ul li:first-child a:after{
}
#menu ul li:first-child a:hover:after{
border-bottom-color: #04acec;
}
#menu ul li:last-child a{
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/* Rétablissement du flottement */
#menu:after{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
/*Sous menu lvl 3 */
#menu ul li ul{
list-style: none;
margin: 0;
padding: 0;
display: none;
margin-left:100%;
top: 0%;
z-index: 99999;
background: linear-gradient(#444, #111);
-moz-border-radius: 5px;
border-radius: 5px;
}
Is anyone knows how to make it works on all browser please?
I removed a few things in your code, like -webkit-padding, -webkit-height and so on.
It's not needed.
I have also removed the fluid padding on links and do a fixed padding on li which are floating elements in that case.
Also removed absolute position of the menu and apply a 100% width.
See it here

How to make border-right longer as <li> divider for menu?

Here's the js fiddle : http://jsfiddle.net/7dbemt0k/
I used below code to make divider.
box-shadow: 1px 0 #111111,
2px 0 #777777;
But I want it to be longer, from very top to very bottom across border-bottom.How do I increase the length or shall I use something like vertical tag? Please advise.Thanks.
HTML
<ul class="sf-menu">
<li>
<a href="<?php echo $data['config']['SITE_DIR']; ?>/">
<img src='<?php echo $data['config']['THEME_DIR']."/img/home_1.png"; ?>'></a>
</li>
<li>
About Us
<ul>
<li>
Centre-Point of Web Projects
</li>
</ul>
</li>
<li>
Branches
<?php Core::getHook('block-branches'); ?>
</li>
<li>
News
</li>
<li>
Events
</li>
<li>
Contact Us
</li>
</ul>
<div class="clear"></div>
CSS
/* Main */
.sf-menu {
width: 100%;
margin: 0;
padding: 10px 0 0 0;
list-style: none;
background-color: #2D2D2D;
/*background-image: linear-gradient(#444, #111);*/
border-bottom:6px solid #072438;
/*border-radius: 50px;*/
/* box-shadow: 0 2px 1px #9c9c9c;*/
box-shadow: 2px 1px #393939;
}
.sf-menu li {
float: left;
padding: 0 0 10px 0;
position: relative;
box-shadow: 1px 0 #111111,
2px 0 #777777;
border-bottom:6px solid #393939;
}
.sf-menu a {
float: left;
height: 20px;
padding: 0 25px;
color: #999;
/* text-transform: uppercase;*/
font: bold 12px/25px Arial, Helvetica;
text-decoration: none;
text-shadow: 0 1px 0 #000;
}
.sf-menu li:hover > a {
color: #fafafa;
}
*html .sf-menu li a:hover { /* IE6 */
color: #fafafa;
}
.sf-menu li:hover > ul {
display: block;
}
/* Sub-menu */
.sf-menu ul {
list-style: none;
margin: 0;
padding: 0;
display: none;
position: absolute;
top: 35px;
left: 0;
z-index: 99999;
background-color: #2D2D2D;
border-bottom:none;
/* background-image: linear-gradient(#444, #111); */
/*-moz-border-radius: 5px;*/
/*border-radius: 5px;*/
}
.sf-menu ul li {
float: none;
margin: 0;
padding: 0;
display: block;
box-shadow: 0 1px 0 #111111,
0 2px 0 #777777;
border-bottom:none;
}
.sf-menu ul li:last-child {
box-shadow: none;
}
.sf-menu ul a {
padding: 10px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
.sf-menu ul a:hover{
margin-left:10px;
}
*html .sf-menu ul a { /* IE6 */
height: 10px;
width: 150px;
}
*:first-child+html .sf-menu ul a { /* IE7 */
height: 10px;
width: 150px;
}
/* active menu*/
/*end */
.sf-menu ul a:hover {
/*background-color: #0186ba;
background-image: linear-gradient(#04acec, #0186ba);*/
}
.sf-menu ul li:first-child a {
/*border-radius: 5px 5px 0 0;*/
}
.sf-menu ul li:first-child a:after {
content: '';
position: absolute;
left: 30px;
top: -8px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid #072438;
}
.sf-menu ul li:first-child a:hover:after {
border-bottom-color: #072438;
}
.sf-menu ul li:last-child a {
/*border-radius: 0 0 5px 5px;*/
}
/* Clear floated elements */
.sf-menu:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.sf-menu ul li a:last-child{
box-shadow: 0 0 #111111,
0 0 #777777;
}
* html .sf-menu { zoom: 1; } /* IE6 */
*:first-child+html .sf-menu { zoom: 1; } /* IE7 */
remove padding: 10px 0 0 0; from .sf-menu and change the padding on .sf-menu li to padding: 10px 0;
FIDDLE
UPDATE
Because the box-shadow is outside of the element's natural width you just have to add some spacing to the li's using margin
.sf-menu li {
float: left;
padding: 10px 0;
margin: 0 0 0 2px; <---- //add margin
position: relative;
box-shadow: 1px 0 #111111,
2px 0 #777777;
border-bottom:6px solid #393939;
}
NEW FIDDLE
.sf-menu li {
float: left;
padding: 0 0 10px 0;
position: relative;
box-shadow: 1px 0px #111111,
2px 0 #777777;
border-bottom:6px solid #393939;
**height:40px;**
}
I don't quite understand yr question but u mentioned that u wanted to increase the vertical divider, you just have to set the height of the li

HTML CSS (responsive drop down menu)

I've been trying to solve this problem for quite some time now. I need my navigation to be responsive. By responsive, i need my nav to still show its links when minimized and dragged to the very left. What my code does now is that the links disappear as if there is no nav bar at all when minimized. Thank you in advance!
Normal view (which is also how i need my nav to look like when minimized)
Current minimized window
Here is my drop down menu code for our CSS:
#menu, #menu ul {
margin: 0;
padding: 0;
list-style: none;
}
#menu {
width: 800px;
margin: 60px auto;
margin-top: -30px;
margin-bottom: 10px;
border-top: 1px solid #000;
border-bottom: 1px solid #000;
background-color: #ffffff;/*bg color of drop down menu*/
}
#menu:before,
#menu:after {
content: "";
display: table;
}
#menu:after {
clear: both;
}
#menu {
zoom:1;
}
#menu li {
float: left;
position: relative;
}
#menu a {
float: left;
padding: 12px 30px;
color: #999; /* home my acct etc */
text-transform: uppercase;
font-family: 'Quicksand', sans-serif;
text-decoration: none;
}
#menu li:hover > a { /*font color of nav while hover */
color: #000000;
background: #FFE87C; /* blue */
}
*html #menu li a:hover { /* IE6 only */
color: #000000;
}
#menu ul {
margin: 20px 0 0 0;
_margin: 0; /*IE6 only*/
opacity: 0;
visibility: hidden;
position: absolute;
top: 38px;
left: 0;
z-index: 1;
background:#FFE87C; /* bg color ng drop down yellow */
box-shadow: 0 -1px 0 rgba(255,255,255,.3);
border-radius: 3px;
transition: all .2s ease-in-out;
}
#menu li:hover > ul {
opacity: 1;
visibility: visible;
margin: 0;
}
#menu ul ul {
top: 0;
left: 150px;
margin: 0 0 0 20px;
_margin: 0; /*IE6 only*/
box-shadow: -1px 0 0 rgba(255,255,255,.3);
}
#menu ul li {
float: none;
display: block;
border: 0;
_line-height: 0; /*IE6 only*/
}
#menu ul li:last-child {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#menu ul a {
padding: 10px;
width: auto;
_height: 10px; /*IE6 only*/
display: block;
white-space: nowrap;
float: none;
text-transform: none;
color: black; /* font color of drop down */
}
#menu ul a:hover {
background-color: #EDDA74;/*hover of link blue*/
color:#000000;
}
#menu ul li:first-child > a {
border-radius: 3px 3px 0 0;
}
#menu ul li:first-child > a:after {
content: '';
position: absolute;
left: 40px;
top: -6px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #D1D0CE;
}
#menu ul ul li:first-child a:after {
left: -6px;
top: 50%;
margin-top: -6px;
border-left: 0;
border-bottom: 6px solid transparent;
border-top: 6px solid transparent;
border-right: 6px solid #D1D0CE;
}
#menu ul li:first-child a:hover:after {
border-bottom-color: #04acec;
}
#menu ul ul li:first-child a:hover:after {
border-right-color: #0299d3;
border-bottom-color: transparent;
}
#menu ul li:last-child > a {
-moz-border-radius: 0 0 3px 3px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
#media screen and (max-width: 600px) {
/* nav-wrap */
#menu-wrap {
position: relative;
}
#menu-wrap * {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* menu icon */
#menu-trigger {
display: block; /* show menu icon */
height: 40px;
line-height: 40px;
cursor: pointer;
padding: 0 0 0 35px;
border: 1px solid #222;
color: #fafafa;
background-color: #111;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPCAMAAADeWG8gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE2QjAxNjRDOUNEOTExRTE4RTNFRkI1RDQ2MUYxOTQ3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE2QjAxNjREOUNEOTExRTE4RTNFRkI1RDQ2MUYxOTQ3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTZCMDE2NEE5Q0Q5MTFFMThFM0VGQjVENDYxRjE5NDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTZCMDE2NEI5Q0Q5MTFFMThFM0VGQjVENDYxRjE5NDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz42AEtnAAAABlBMVEX///////9VfPVsAAAAAnRSTlP/AOW3MEoAAAAWSURBVHjaYmAgFzBiACKFho6NAAEGAD07AG1pn932AAAAAElFTkSuQmCC) no-repeat 10px center, linear-gradient(#444, #111);
border-radius: 6px;
box-shadow: 0 1px 1px #777, 0 1px 0 #666 inset;
}
/* main nav */
#menu {
margin: 0; padding: 10px;
position: absolute;
top: 40px;
width: 100%;
z-index: 1;
background-color: #48CCCD;
display: none;
box-shadow: none;
}
#menu:after {
content: '';
position: absolute;
left: 25px;
top: -8px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid #444;
}
#menu ul {
position: static;
visibility: visible;
opacity: 1;
margin: 0;
background: none;
box-shadow: none;
}
#menu ul ul {
margin: 0 0 0 20px !important;
box-shadow: none;
}
#menu li {
position: static;
display: block;
float: none;
border: 0;
margin: 5px;
box-shadow: none;
}
#menu ul li{
margin-left: 20px;
box-shadow: none;
}
#menu a{
display: block;
float: none;
padding: 0;
color: #999;
}
#menu a:hover{
color: #fafafa;
}
#menu ul a{
padding: 0;
width: auto;
}
#menu ul a:hover{
background: none;
}
#menu ul li:first-child a:after,
#menu ul ul li:first-child a:after {
border: 0;
}
}
I think you should try to set the "html, body" tags in your CSS with min-width: x% / xpx, x being your choice, e.g. min-width: 700px or min-width: 75%

CSS nested menu is not aligned properly

I have a basic nested menustruct:
http://jsfiddle.net/vqnUP/
#topmenu
{
min-height: 54px;
width: 980px;
margin: 0 auto;
background-color: green;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
#topmenu ul
{
list-style-type: none;
margin: 0 0 0 0;
padding: 13px 0 0 0;
color: #fff;
font-size: 1.6em;
}
#topmenu ul li
{
display: inline;
padding: 15px 2.5% 17px 2.5%;
margin: 0 0 0 0;
border-right: 1px solid #000;
box-shadow: 1px 0px 0px #6e6b6b;
position: relative;
}
#topmenu ul li:last-child
{
border: none;
box-shadow: none;
}
#topmenu ul li:first-child
{
border-top-left-radius: 15px;
}
#topmenu ul li img
{
vertical-align: middle;
}
#topmenu a
{
color: #fff;
text-decoration: none;
height: 54px;
}
#topmenu ul li ul{
display: none;
list-style-type: none;
margin: 0 0 0 0;
padding: 13px 0 0 0;
color: #fff;
font-size: 1.6em;
position: absolute;
z-index: 1000;
background-color: red;
}
#topmenu ul li:hover ul{
display: block;
}
#topmenu ul li ul li{
display: block;
padding: 15px 2.5% 17px 2.5%;
margin: 0 0 0 0;
border-right: 1px solid #000;
box-shadow: 1px 0px 0px #6e6b6b;
font-size: 14px;
}
#topmenu ul li ul li:last-child{
border: none;
box-shadow: none;
}
#topmenu ul li ul li:first-child{
border-top-left-radius: 15px;
}
#topmenu ul li ul li img{
vertical-align: middle;
}
<div id="topmenu">
<ul>
<li class=""><a href="home"><img src='/assets/upload/pagemenu/home.png' /></li>
<li class="">Tanßr</li>
<li class="">Dißk</li>
<li class="">SzŘl§</li>
<li class="">Nyelviskola</li>
<li class="">
Boltok
<ul>
<li class="">aaaaaaaa</li>
<li class="">aaaaaaaaa</li>
</ul>
</li>
<li class="">Kapcsolat</li>
<li class="">Linkek</li>
<li class="kiemelt">Webshop</li>
</ul>
<div style="clear: both;"></div></div>
its almost OK, but the submenu in "Boltok" (containing aaaaaaa) doesnt appear excatly under the "Boltok" menu, but aligned to left. I can't figure out the mistake...
I added a top and left to your sub menu
#topmenu ul li ul{
display: none;
list-style-type: none;
margin: 0 0 0 0;
padding: 13px 0 0 0;
color: #fff;
font-size: 1.6em;
position: absolute;
z-index: 1000;
background-color: red;
top: 62px; /* added */
left: 0; /* added */
width: 100%; /* this will cause the submenu to take the 100% width of the containing li - optional? */
};
So we only target the first ul li's you change this class like this. Also added a float: left and changed the display to block
#topmenu > ul > li
{
display: block; float: left;
padding: 15px 2.5% 17px 2.5%;
margin: 0 0 0 0;
border-right: 1px solid #000;
box-shadow: 1px 0px 0px #6e6b6b;
position: relative;
}
Here's the updated fiddle: http://jsfiddle.net/vqnUP/2/
jsFiddle
I'm only addressing the issue you mentioned.
I have just added
width:100%; to #topmenu ul li ul and
text-align:center; to #topmenu ul li ul li.
Hope that helps...

Nav menu and ribbons broken in Internet Explorer

I'm encountering two problems in Internet Explorer at the moment. The first is my navigation menu: the links are stacking on top of each other instead of going across the bar. Here is my code for the nav menu.
HTML
<div class="main-navigation" role="navigation" style="margin-top: 5px;">
<div class="nav-menu"><ul><li class="page_item page-item-8">design your own</li><li class="page_item page-item-10">fan photos</li><li class="page_item page-item-12">Win a free T-shirt</li></ul></div>
</div><!-- #site-navigation -->
CSS
.main-navigation li {
margin: 0px 20px 0px 0px;
position: relative;
text-align: center;
padding: 7px 0px;
}
.main-navigation li ul {
display: none;
margin: 0;
padding: 0;
position: absolute;
top: 100%;
z-index: 1;
}
.main-navigation li ul ul {
top: 0;
left: 100%;
}
.main-navigation ul li:hover > ul {
border-left: 0;
display: block;
}
.main-navigation li ul li a {
background: #efefef;
border-bottom: 1px solid #ededed;
display: block;
font-size: 11px;
font-size: 0.785714286rem;
line-height: 2.181818182;
padding: 8px 10px;
padding: 0.571428571rem 0.714285714rem;
width: 180px;
width: 12.85714286rem;
white-space: normal;
}
.main-navigation li ul li a:hover {
background: #e3e3e3;
color: #444;
}
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a,
.main-navigation .current_page_ancestor > a {
color: #cb0000;
font-weight: bold;
}
The second problem is with my two ribbons I have for titles in the side bar.
The right bottom flap that gives it the wrap around look is not showing up.
HTML
<div class="ribbon"><strong>SPECIAL OFFERS</strong></div>
CSS
.ribbon {
padding-bottom: 7px;
padding-top: 8px;
padding-left: 3px;
color: #fff;
text-shadow: 1px 1px 0px #c1c1c1;
font-size: 15px;font-family:'Century Gothic',futura,'URW Gothic L',Verdana,sans-serif;
letter-spacing: 5px;
position:relative;
width:267px;
right:0px;
top:19px;
background-color:#212121;
-moz-border-radius:2px 0px 0px 2px; /*radius of 2px*/
-khtml-border-radius:2px 0px 0px 2px;
-webkit-border-radius:2px 0px 0px 2px;
-webkit-box-shadow: -2px 2px 4px rgba(50, 50, 50, 0.35);
-moz-box-shadow: -2px 2px 4px rgba(50, 50, 50, 0.35);
box-shadow: -2px 2px 4px rgba(50, 50, 50, 0.35);
}
.ribbon:after {
content:'';
width:0;
height:0;
border-color: #000 transparent transparent #000;
border-style:solid;
border-width:5px 5px;
position:absolute;
right:0;
bottom:-10px;
}
This code works in other major browsers, but not in IE.
For the first issue you should add anywhere you have display: inline-block for ie
zoom: 1;
*display: inline
Update
.main-navigation div.nav-menu > ul {
border-bottom: 1px solid #ededed;
border-top: 1px solid #ededed;
display: inline-block !important;
*display: inline
zoom: 1;
text-align: center;
width: 100%;
}
.main-navigation li a,
.main-navigation li {
display: inline-block;
*display: inline
zoom: 1;
text-decoration: none;
}
From the link you provided