PDA

View Full Version : Pullout Menu Help


Doom87
01-27-2008, 08:09 PM
Hello i made a pullout menu for my site's navigation. The problem i've encountered is where there is a pullout section there is a gap between the next one.

Here's what i mean... http://www.ootaclan.org/test/navigation/test.html

Between item 3 & 4 theres a noticable gap. I'm not sure how to fix it.

Here's the code from the style sheet:

.menu {
z-index:1000;
font-size:90%;
margin:25px 0 50px 15px; /* this page only */
}

/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0;
margin:0;
list-style-type:none;
width:150px;
}
/* hack for IE5.5 */
* html .menu ul {margin-left:-16px; ma\rgin-left:0;}
/* position relative so that you can position the sub levels */
.menu li {
position:relative;
background:#d4d8bd;
height:26px;
}

/* get rid of the table */
.menu table {position:absolute; border-collapse:collapse; top:0; left:0; z-index:100; font-size:1em;}

/* style the links */
.menu a, .menu a:visited {
display:block;
text-decoration:none;
height:25px;
line-height:25px;
width:149px;
color:#000;
text-indent:5px;
border:1px solid #fff;
border-width:0 1px 1px 0;
}
/* hack for IE5.5 */
* html .menu a, * html .menu a:visited {background:#d4d8bd; width:150px; w\idth:149px;}
/* style the link hover */
* html .menu a:hover {color:#fff; background:#949e7c;}

.menu :hover > a {
color:#fff;
background:#949e7c;
}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
top:0;
left:150px;
}
/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul,
.menu ul a:hover ul {
visibility:visible;
}

/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
visibility:hidden;
}
/* keep the fourth level hidden when you hover on second level list OR link */
.menu ul :hover ul :hover ul ul{
visibility:hidden;
}
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{
visibility:visible;
}
/* make the fourth level visible when you hover over third level list OR link */
.menu ul :hover ul :hover ul :hover ul {
visibility:visible;
}
</style>
<!--[if IE 7]>
<style type="text/css">
.menu li {float:left;}

twodayslate
01-27-2008, 09:38 PM
In what browser are you having a problem with it?
Looks fine in FF for me.

Apostropartheid
01-27-2008, 10:18 PM
You seem to be commenting out a lot of stuff for IE...

...Don't?

Doom87
01-27-2008, 10:43 PM
ya in IE 7 theres a gap. just tested it in firefox myself and it worked out fine. What should i un-comment so it can work in both browsers?

The style sheet was pre-made so i don't really know how to make it work for both browsers.

twodayslate
01-27-2008, 11:39 PM
Learn how to use CSS. Do not just take code. Know what you are doing.

Check out http://www.w3schools.com/css/default.asp to learn about CSS

jcdevelopment
01-28-2008, 02:53 PM
Here is a great website and editor that have a great tutorial for making a blog/forum

http://codeigniter.com/

effpeetee
01-28-2008, 03:11 PM
Alter your css to this.

Remove the red comments before you copy it.

Frank

/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0; Put this at the start.
margin:0;
list-style-type:none;
width:150px;
}

body {scrollbar-face-color:#212121; scrollbar-highlight-color:#404040; scrollbar-shadow-color:#000000; scrollbar-3dlight-color:#616161; scrollbar-arrow-color:#A1A1A1; scrollbar-track-color:#000000; scrollbar-darkshadow-color:#000000;}

a {text-decoration: none}
a:hover {text-decoration: underline; color: #FF0000;}

.menu {
z-index:1000;
font-size:90%;
margin:25px 0 50px 15px; /* this page only */
}

/* remove all the bullets, borders and padding from the default list styling */
.menu ul {
padding:0;
margin:0;
list-style-type:none;
width:150px;
}
/* hack for IE5.5 */
* html .menu ul {margin-left:-16px; ma\rgin-left:0;}
/* position relative so that you can position the sub levels */
.menu li {
position:relative;
background:#d4d8bd;
height:26px;
}

/* get rid of the table */
.menu table {position:absolute; border-collapse:collapse; top:0; left:0; z-index:100; font-size:1em;}

/* style the links */
.menu a, .menu a:visited {
display:block;
text-decoration:none;
height:25px;
line-height:25px;
width:149px;
color:#000;
text-indent:5px;
border:1px solid #fff;
border-width:0 1px 1px 0;
}
/* hack for IE5.5 */
* html .menu a, * html .menu a:visited {background:#d4d8bd; width:150px; w\idth:149px;}
/* style the link hover */
* html .menu a:hover {color:#fff; background:#949e7c;}

.menu :hover > a {
color:#fff;
background:#949e7c;
}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {
visibility:hidden;
position:absolute;
top:0;
left:150px;
}
/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul,
.menu ul a:hover ul {
visibility:visible;
}

/* keep the third level hidden when you hover on first level list OR link */
.menu ul :hover ul ul{
visibility:hidden;
}
/* keep the fourth level hidden when you hover on second level list OR link */
.menu ul :hover ul :hover ul ul{
visibility:hidden;
}
/* make the third level visible when you hover over second level list OR link */
.menu ul :hover ul :hover ul{
visibility:visible;
}
/* make the fourth level visible when you hover over third level list OR link */
.menu ul :hover ul :hover ul :hover ul {
visibility:visible;
}
Stuff removed from here

.menu li {float:left;}
</style>