IE 6 and 7 bug making third tier navigation float to away - css

I'm having problems trying to figure out why my drop down navigation is settling under where they are suppose to in IE 6 and IE 7. Any help you could give me would be life saving for me.
the css file for the drop down nav
#nav-bar { /*Container Div*/
width: 950px;
height: 45px;
background-image:url(images/nav-bar-background.jpg);
background-repeat: no-repeat;
margin: 7px 0 2px 0;
z-index:999;
position:relative;
padding:0;
}
/*First Level*/
#nav-bar ul {
padding: 10px;
text-align:center;
margin-top: 6px;
}
#nav-bar ul li {
font-family: Arial, Helvetica, sans-serif;
color: #585858;
font-size: 14px;
display: inline;
padding:0 9px 40px 9px;
text-align:center;
}
#nav-bar ul li a {
text-decoration: none;
color: #585858;
}
/*First Level HOVER*/
#nav-bar ul li a:hover {
background-image: url(nav.png);
background-repeat: repeat-x;
}
* html ul#nav-bar li a {
height:37px;
margin-top:-10px;
}
ul#nav-bar>li a:hover, ul#nav-bar>li:hover {
background-position:0px -20px;
height:37px;
text-decoration:none;
}
* html ul#nav-bar li a:hover, * html ul#nav-bar li:hover, * html ul#nav-bar li.hover {
background-position:0px -20px;
height:27px;
}
#nav-bar ul ul {
background-image:url(images/secondtierbg.gif);
display:none;
}
#nav-bar ul ul li {
width:100px;
}
#nav-bar ul ul li a {
line-height:26px;
}
#nav-bar ul li {
font-family: Arial, Helvetica, sans-serif;
color: #585858;
font-size: 14px;
display: inline;
padding: 10px 9px 20px 9px;
text-align:center;
}
#nav-bar ul li a {
text-decoration: none;
color: #585858;
}
#nav-bar li:hover ul, #nav-bar li.hover ul {
display:inline;
position:absolute;
left:0;
top:44px;
width:950px;
height:26px;
margin:0 auto;
padding: 0;
z-index:200;
}
* html #nav-bar li.hover ul {
height:37px;
}
/*
#nav-bar li:hover li {
list-style:none;
display:inline;
color:#fff;
margin:5px 0px 0 20px;
padding:0;
}
*/
#nav-bar li:hover li a, #nav-bar li.hover li a {
color:#fff;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
text-align:center;
margin-top: 10px;
padding: 5px;
text-decoration:none;
}
#nav-bar li:hover li a:hover {
background:none!important;
}
/* THIS IS FOR DROP DOWNS */
#nav-bar ul ul ul {
visibility: hidden;
background-image: none;
display: block;
margin: 0px;
padding: 0px;
list-style: none;
}
#nav-bar ul ul ul li {
display: block;
width:100px;
height: auto;
font-family: Arial, Helvetica, sans-serif;
color:#FFF;
font-size: 11px;
background-color:maroon;
border-style: solid;
border-color: white;
border-width: 1px 1px 0 1px;
padding: 5px 0;
float: none;
clear: both;
}
#nav-bar ul ul #firstrange li {
width:100px;
}
#nav-bar ul ul ul li:last-child {
border-bottom: 1px solid white;
/*background:transparent;*/
}
#nav-bar ul ul ul li a{
cursor:pointer;
line-height:14px;
}
#nav-bar ul ul li:hover ul {
visibility: visible;
left:0;
position:absolute;
margin-top:0;
top:31px;
z-index:220;
}
#nav-bar ul ul li:hover {
position:relative;
}
the link is:
http://www.paysonsecure.com/colonialwarsct/

notes/advice/question:
Think about how you can make this work in two levels.
I had difficulties trying to get the second level to show in IE(Something you might wanna work on too).
Consider having a vertical sub-menu. It's easier for the user to navigate.
Question. How much content is going to go in each year? If not much, maybe you can group years content.
I re-worked the css for the navigation I think its a good start - if you wish.
http://jsfiddle.net/EvRem/1/
Hope this made sense

Related

How do I place the submenu linkes stacked under each other?

How do I place the submenu links under each other. Right now they jump under the whole menu and is placed right next each other. And the links after goes under the submenu. I know its something with position but doesnt know which one and were.
CSS
#nav {
background-color: #8D8084;
}
#nav ul {
margin:0;
list-style-type: none;
padding: 12px;
}
#nav li {
display:inline;
}
#nav a {
}
#nav ul li a {
text-decoration:none;
color:#fff;
padding-right: 60px;
padding-top: 15px;
padding-bottom: 13px;
padding-left: 50px;
margin: -12px;
background:#8D8084;
font-family: Candara,"Trebuchet MS", Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
text-transform:uppercase;
}
#nav ul li.active a {
background-color:#A4999D;
color:#FFFFFF;
}
#nav a:hover {
background-color:#A4999D;
color:#FFF;
}
#nav ul ul {
display: none;
}
#nav ul li:hover > ul {
display: block;
}
You have to change so much in your style. Here is the sample i have created.
#nav {
background-color: #8D8084;
}
#nav ul {
margin:0;
list-style-type: none;
padding: 12px;
}
#nav li {
display:inline;
position:relative;
}
#nav ul ul li
{
display:block;
}
#nav ul li a {
text-decoration:none;
color:#fff;
padding-right: 60px;
padding-top: 15px;
padding-bottom: 13px;
padding-left: 50px;
margin: -12px;
background:#8D8084;
font-family: Candara,"Trebuchet MS", Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
text-transform:uppercase;
}
#nav ul li.active a {
background-color:#A4999D;
color:#FFFFFF;
}
#nav a:hover {
background-color:#A4999D;
color:#FFF;
}
#nav ul ul {
display: none;
position:absolute;
top:20px;
left:0;
}
#nav ul li:hover > ul {
display: block;
}
DEMO
EDIT
New updated jsfiddle Here based on OP comment.

Editing the font size in accordion menu module in joomla 2.5

I'm using this accordion menu module in joomla 2.5 http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/accordion-menus/21961 , and the problem is that the submenu items have a bigger font than the menus in the starting level. I found in the template .css file where I can edit the size of the starting level menus, but not for the submenus. Here's a screenshot how it looks http://img7.imageshack.us/img7/1180/tikx.png
And here is the css code of this module:
.accordion-menu a{
text-decoration: none;
background: none;
font-family: Arial;
}
.accordion-menu a:hover,
.accordion-menu a:visited,
.accordion-menu a:active,
.accordion-menu a:focus{
background: none;
}
.accordion-menu a img {
vertical-align:middle;
border: 0 none;
height: auto;
max-width: 100%;
padding:0 5px 0 0;
}
.accordion-menu li{
cursor: pointer;
background:none !important;
}
.accordion-menu .opened{
border-bottom:none!important;
}
.accordion-menu li:last-child, .accordion-menu > li.last {
border-bottom: 1px solid #1a1a1a!important;
margin-bottom:-1px;
}
.accordion-menu > li > .item-wrapper{
height: 35px;
display:inline-block;
width:100%;
}
.accordion-menu > li > .item-wrapper a{
line-height: 35px;
font-size: 12px;
font-weight: bold;
}
.accordion-menu li .item-wrapper .menu-button{
width: 16px;
height: 16px;
margin: 9px 5px 0px 5px;
overflow: hidden;
}
.accordion-menu li .item-wrapper .menu-link{
width:81%;
}
.accordion-menu li .ul-wrapper{
display: none;
}
.accordion-menu li ul li .item-wrapper{
/* height: 30px; */
display:inline-block;
width:97%;
}
.accordion-menu li ul li .item-wrapper a{
line-height:35px;}
ul.accordion-menu li ul {
margin:0px;
padding:0px;
margin-bottom:-1px;
}
ul.accordion-menu li ul li .item-wrapper{
margin:0px;
padding-left:12px!important;
}
ul.accordion-menu li ul li li{
margin:0px;
padding-left:0px!important;
}
The line you want to change is this:
.accordion-menu li ul li .item-wrapper a {
line-height:35px;
font-size: 12px; /* Add this in */
}
Hope this helps

CSS for dropdown menus both centered and to the left

I recently took over a friend's site and have been having a fun (read: not fun) time dealing with the theme that was built for it. My current issue are the menus. The first tier of the dropdown menu is centered, which is fine, but the second is pushed to the right, which is a problem with this theme. Since the menu is easier to fix, that's what I am trying to attack, but I CANNOT figure out what to change to push the menu to the left.
Here is my current CSS:
.menu-maine-menue-container {
width: 990px;
margin-left: auto;
margin-right: auto;
font-weight: bold;
}
.menu-maine-menue-container ul {
clear:left;
float:left;
list-style:none !important;
margin:0;
padding: 8px 0px 0px 0px;
position:relative;
left:50%;
text-align:center;
}
.menu-maine-menue-container ul li {
list-style:none !important;
position:relative;
right:50%;
padding: 0px 22px 8px 22px;
float: left;
font-weight: normal;
color: #fbfbd5;
text-shadow: rgb(0, 0, 0) 2px 2px 0px;
font-family: 'Sohoma';
font-size: 20px;
text-transform: uppercase;
letter-spacing: .05em;
}
.menu-maine-menue-container ul li:first-child {
padding-left: 0px ;
}
.menu-maine-menue-container ul li a {
color: #fbfbd5;
}
.menu-maine-menue-container ul li a:hover {
color: #d5f4ed !important;
text-decoration: none;
text-shadow: rgb(0, 0, 0) 2px 2px 3px;
}
.current-menu-item a, .menu-maine-menue-container ul li a:active {
color: #d5f4ed !important;
}
.menu-maine-menue-container ul li a:active {
text-shadow: none !important;
}
/* SUB MARINE MENUZ */
.menu-maine-menue-container ul ul {
list-style: none;
margin:0; /* Appear just below the hovering list */
padding:0;
width:220px; /* specify the width. */
position:absolute; /* needed */
z-index:500; /* specify the order */
}
.menu-maine-menue-container ul li ul {
top:27px; /* Positioning:Calc with top level horz list height */
}
.menu-maine-menue-container ul ul ul {
top:0;
left:100%; /* Position the sub menus to left. */
}
.menu-maine-menue-container ul li ul li {
float:left;
padding: 12px 8px 9px 8px !important;
margin-left: auto; margin-right: auto;
background: #eb5a4e;
width: 200px;
text-align: center !important;
}
.menu-maine-menue-container ul li ul li:last-child {
padding-bottom: 15px;
}
.menu-maine-menue-container ul li li a {
font-size: 17px;
line-height: 19px;
text-align: center !important;
width: 200px;
}
/* Drop Down! */
/* Hide all the dropdowns (submenus) */
.menu-maine-menue-container ul ul,
.menu-maine-menue-container ul li:hover ul ul,
.menu-maine-menue-container ul ul li:hover ul ul
{ display: none;}
/* Display the submenus only when li are hovered */
.menu-maine-menue-container ul li:hover ul,
.menu-maine-menue-container ul ul li:hover ul ,
.menu-maine-menue-container ul ul li ul li:hover ul
{ display: block;}
The site is freejeremy.net and the area of issue is "Support" and "Prisoner Soldarity."
The rule you need to change is .menu-maine-menue-container ul ul ul which has left:100%
Change the 100% to -50% (or something similar) and you should be fine..

Alignment of submenu

I am unable to get rid of a gap between my nav bar and my submenu dropdown menu. You can view the issue here.
My css is here:
nav#nav{
float: left;
font: 14px/16px 'MuseoSlab500Regular', arial, helvetica, sans-serif;
margin-right: auto;
z-index: 99999;
/*background-image: url(../images/2blkbg.png);*/
/*background-repeat: repeat-x;*/
padding-left: 30px;
/*background-position: left bottom;*/
background-color: #000;
height: 53px;
display: block;
position: relative;
margin-top: 15px;
margin-bottom: 15px;
}
#nav ul{
list-style: none;
margin: 0;
padding: 0;
}
#nav ul li{
float: left;
margin-right: 0;
margin-bottom: 0;
padding-top: 0;
padding-right: 49px;
padding-bottom: 0;
padding-left: 0;
}
#nav ul a,#nav li.current-menu-ancestor a{
display: block;
height:83px;
line-height: 53px;
border-top-width: 0px;
border-top-style: solid;
border-top-color: #fff;
}
#nav ul .current_page_item a, #nav ul .current-menu-item a, #nav ul > .current-menu-parent a{
color:#a0ce4e;
text-decoration:none;
border-color:#a0ce4e;
}
#nav ul li{
position: relative;
}
#nav ul ul{
display: none;
position: absolute;
top: 0px;
left: 0;
width: 170px;
background: #edebeb;
z-index: 100000;
border-top: 3px solid #a0ce4e;
z-index: 99999;
}
#nav ul li:hover ul{
display: block;
}
#nav ul li ul li{
display: block;
float: none;
margin: 0;
padding: 0;
background-image: url(../images/blkbg.png);
background-repeat: repeat-x;
}
#wrapper #nav ul li ul li a{
background: url(../images/subnav_sep.jpg) repeat-x bottom left;
border: 0;
height: 30px;
text-indent: 20px;
font: 13px/30px 'PTSansRegular', Arial, Helvetica, sans-serif;
color: #333333 !important;
}
#wrapper #nav ul li ul li a:hover,#wrapper #nav ul li ul li.current-menu-item a{
background-color:rgba(255,255,255,0.5);
}
#nav ul ul ul{
display:none !important;
}
#nav ul ul li:hover ul{
display:block !important;
top:-3px;left:170px;
}
#nav select{
max-width:100%;
display:none;
}
#nav > li > a,#nav li.current-menu-ancestor a {
height:83px;
line-height:83px;
}
#nav ul ul {
top:86px;
}
Set the top and that will remove the excess of gap:
#nav ul ul {
top:86px;
}
Good you posted the url, since problem is not in the css you included. The problem is in this class:
#nav ul ul {
top:86px;
}
This top-offset should be set to 53px, the same height as your menu bar (nav#nav):
#nav ul ul {
top:53px;
}
This css-class actually is not in your css-stylesheet, but in your page itself. It is included in the <head></head>.

IE9 random CSS problems

I am currently debuggig my site in IE9, and I am coming across a view quirks mainly to do with the navigation bar that runs across of the top the site,
When you look at http://mensclothingroom.factoryagency.co.uk the nav is fine, however if you then look at http://mensclothingroom.factoryagency.co.uk/category/socks the nav partially stacks, this is really confusing as they are running the same CSS and also ie specific stylesheets.
CSS
.navigation {
position:absolute;
top:69px;
left:5px;
padding:0px 0px 0px 4px;
border-bottom:1px solid #ccc;
}
.navigation .site_navigation {
padding:7px 0px 7px 0px;
clear:both;
}
.navigation .site_navigation ul {
height: 34px;
line-height: 34px;
}
.navigation .site_navigation li {
float: left;
height: 16px;
margin-right: 15px;
position: relative;
}
.navigation .site_navigation li > ul {
display:none;
width:165px;
position:absolute;
left:0px;
top:34px;
background:#fff;
border:1px solid #aaa;
z-index:999;
height:auto;
padding:2px 0px
}
.navigation .site_navigation li:hover > ul {
display:block;
box-shadow: 2px 2px 2px #999999;
}
.navigation .site_navigation li:hover > ul li > ul {
display:none;
}
.navigation .site_navigation li:hover > ul li,
.sidebar_navigation li {
line-height:11px;
clear:both;
display:block;
margin-bottom:2px;
width:140px;
}
.navigation .site_navigation li:hover > ul li {
height: auto !important;
line-height: normal;
}
.navigation .site_navigation li:hover > ul a,
.sidebar_navigation a {
font-size:10px;
padding:6px 0 6px 10px;
width:130px;
display:block;
}
.navigation .site_navigation li:hover > ul a {
width:155px;
}
.navigation .site_navigation li > ul a:hover,
.navigation .site_navigation li:hover > a,
.sidebar_navigation a:hover {
font-size:10px;
background:#999;
color:#fff;
}
.navigation .site_navigation li:hover > a {
font-size:12px;
}
.navigation .site_navigation li.sale {
float: right;
height: 25px;
line-height: 25px;
margin-right: 4px;
}
.navigation .site_navigation li.sale a {
background:#BE1E2D;
height:16px;
color:#fff;
padding:4px 18px;
}
.navigation .site_navigation li a.sale {
display:block;
height:25px;
}
.navigation .site_navigation li.current a.sale {
background:#9C1925;
}
.navigation .site_navigation li a,
.sidebar_navigation a {
color: #666666;
font-family: Georgia,Times,"Times New Roman",sans-serif;
font-size: 12px;
letter-spacing: 0.05em;
text-decoration: none;
text-transform: uppercase;
}
.navigation .site_navigation li a {
display: block;
padding: 0 10px;
}
.navigation .site_navigation li > ul a {
padding:0px 0px 0px 12px;
}
.navigation .site_navigation li a:hover,
.navigation .site_navigation li.current a {
background:#aaa;
color:#fff;
}
IE CSS
.navigation .site_navigation {
padding:10px 0px 0px 0px;
}
.navigation .site_navigation li {
list-style:none outside none;
margin-right:15px;
float:left;
height:auto;
}
Can anyone shed any light on the problem?
Looking at it in the W3C HTML Validator...
Your first link has no stray HTML tags.
Your second link has lots of stray/missing tags which could cause rendering problems in certain browsers.
Line 124, Column 9: Stray end tag ul.
Line 302, Column 11: No li element in scope but a li end tag seen.
Line 319, Column 7: End tag for body seen, but there were unclosed elements.
Line 31, Column 34: Unclosed element div.

Resources