PDA

View Full Version : Please help me with Suckerfish Menu


jacf182
08-08-2008, 04:14 AM
Howdy everyone!
I'm making a website, which is still under construction, but hope to launch it soon. The problem with my Superfish menu is that it doesn't adjust to the page width whenever I make the window of my browser smaller. This also happens with smaller resolution screens...

Here's the CSS code:

/*========= SuckerFish ===============*/
#suckerfishnav {
background:#4838C1 url("http://localhost:8888/uesma/wp-content/plugins/multi-level-navigation-plugin/images/suckerfish_blue.png") repeat-x;
position:center;
font-size:12px;
font-family:helvetica,sans-serif;
font-weight:normal;
width:200px;
}
#suckerfishnav, #suckerfishnav ul {
float:left;
list-style:none;
line-height:40px;
padding:0;
border:1px solid #aaa;
margin:0;
width:956px;
}
#suckerfishnav a {
display:block;
color:#FFFFFF;
text-decoration:none;
padding:0px 10px;
}
#suckerfishnav li {
float:left;
padding:0;
}
#suckerfishnav ul {
position:absolute;
left:-999em;
height:auto;
width:100px;
font-weight:normal;
margin:0;
line-height:1;
border:0;
border-top:1px solid #666666;
}
#suckerfishnav li li {
width:99px;
border-bottom:1px solid #666666;
border-left:1px solid #666666;
border-right:1px solid #666666;
font-weight:normal;
font-family:helvetica,sans-serif;
}
#suckerfishnav li li a {
padding:4px 10px;
width:80px;
font-size:12px;
color:#ffffff;
}
#suckerfishnav li ul ul {
margin:-21px 0 0 100px;
}
#suckerfishnav li li:hover {
background:#333366;
}
#suckerfishnav li ul li:hover a, #suckerfishnav li ul li li:hover a, #suckerfishnav li ul li li li:hover a, #suckerfishnav li ul li li li:hover a {
color:#3366ff;
}
#suckerfishnav li:hover a, #suckerfishnav li.sfhover a {
color:#dddddd;
}
#suckerfishnav li:hover li a, #suckerfishnav li li:hover li a, #suckerfishnav li li li:hover li a, #suckerfishnav li li li li:hover li a {
color:#ffffff;
}
#suckerfishnav li:hover ul ul, #suckerfishnav li:hover ul ul ul, #suckerfishnav li:hover ul ul ul ul, #suckerfishnav li.sfhover ul ul, #suckerfishnav li.sfhover ul ul ul, #suckerfishnav li.sfhover ul ul ul ul {
left:-999em;
}
#suckerfishnav li:hover ul, #suckerfishnav li li:hover ul, #suckerfishnav li li li:hover ul, #suckerfishnav li li li li:hover ul, #suckerfishnav li.sfhover ul, #suckerfishnav li li.sfhover ul, #suckerfishnav li li li.sfhover ul, #suckerfishnav li li li li.sfhover ul {
left:auto;
background:#3366FF;
}
#suckerfishnav li:hover, #suckerfishnav li.sfhover {
background:#333366;
}
#suckerfishnav {margin-left:233px}


and here's the link to my website so you can recreate the problem:
http://www.uesma.edu.ec/index.php

ninnypants
08-08-2008, 06:15 AM
You need to validate your code it has 29 errors (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.uesma.edu.ec%2Findex.php&charset=(detect+automatically)&doctype=Inline&group=0) Then I would suggest that your get rid of the highlighted code

#suckerfishnav {
background:#4838C1 url("http://localhost:8888/uesma/wp-content/plugins/multi-level-navigation-plugin/images/suckerfish_blue.png") repeat-x;
position:center;
font-size:12px;
font-family:helvetica,sans-serif;
font-weight:normal;
width:200px;
}


and replace it with

#suckerfishnav {
background:#4838C1 url("http://localhost:8888/uesma/wp-content/plugins/multi-level-navigation-plugin/images/suckerfish_blue.png") repeat-x;
margin:0 auto;
font-size:12px;
font-family:helvetica,sans-serif;
font-weight:normal;
width:200px;
}

jacf182
08-08-2008, 06:58 AM
Thank you very much, I will re-validate my terrible code and try that code change :o

jacf182
08-08-2008, 09:46 AM
After nearly 8 consecutive hours trying to solve this problem, I finally managed to do it. Turns out the problem was in the header.php file, I had not put the menu code in the header tag, thus it had no formatting.:thumbsup: