css menu problem

3 views
Skip to first unread message

crni

unread,
Nov 19, 2009, 7:36:10 AM11/19/09
to Design the Web with CSS
here is how i created menu, well it's very simple but i cant seem to
make it work.
I cant make hover as block, and i cant click on active link.

<ol id="navlinks">
<li ><a href="http://www.manded.rs"></a>www.maned.rs</li>
<li><a href="http://www.manded.co.rs"></a>www.maned.co.rs</li>
<li><a href="http://www.manded.rs"></a>www.maned.rs</li>
<li><a href="http://www.manded.co.rs"></a>www.maned.co.rs</li>
<li><a href="http://www.manded.rs"></a>www.maned.rs</li></ol>

code:
#navlinks {
padding:0 0 0 4em;
margin:0;
color: #000;
}

#navlinks li {
display: inline;
float:left
margin-right: 0.5em; padding-right: 0.75em;
margin-left:1em;
font-weight: bold;
font-size:18px;
}
#navlinks li a {
color: #000;
text-decoration: none;
}

#navlinks li:hover {
color:#0033FF;

}

here si the link to menu: http://svastara.filmske-radosti.com/index.html

PhillipB

unread,
Nov 20, 2009, 5:12:32 AM11/20/09
to Design the Web with CSS
#navlinks li a:hover { color:#0033FF

crni

unread,
Nov 20, 2009, 5:24:55 AM11/20/09
to Design the Web with CSS
It's not working with that either.
When i put lia:hover, i dont get hover it's like it dont recognize
that is is a link...

jkronika

unread,
Nov 20, 2009, 12:19:15 PM11/20/09
to Design the Web with CSS
Looks to me like the problem may be your HTML. The <A> tags are closed
before the text within the <LI>s. Try replacing it with this:

<ol id="navlinks">
<li ><a href="http://www.manded.rs">www.maned.rs</a></li>
<li><a href="http://www.manded.co.rs">www.maned.co.rs</a></li>
<li><a href="http://www.manded.rs">www.maned.rs</a></li>
<li><a href="http://www.manded.co.rs">www.maned.co.rs</a></li>
<li><a href="http://www.manded.rs">www.maned.rs</a></li></ol>

crni

unread,
Nov 21, 2009, 4:15:18 AM11/21/09
to Design the Web with CSS
Two heads are smarter that 1, apparently ;)

thans very much for the help:)

crni

unread,
Nov 22, 2009, 10:54:53 AM11/22/09
to Design the Web with CSS
Now i cant to make it work on stupid IE!!!
here is my menu code:

#menu {
text-align:center;
float: left;
text-align:center;
width: 100%;
position:absolute;
}


#menu ul {
list-style: none;
float: left;
width: 128px;
margin:0;
padding: 0;
width: 127.114px;
}
#menu a, #menu h2 {
font: bold 11px/16px arial, helvetica, sans-serif;
text-align:justify;
display: block;
border-width: 1.5px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 6px;

}

#menu h2 {
width:120px;
color: #000;
background-image:url(./images/button%2002.gif);
text-transform: uppercase;
text-align:center;
}

#menu a {
color: #000;
background: #efefef;
text-decoration: none;
background-image:url(./images/button%2002.gif);
}

#menu a:hover {
color: #000;
background: #fff;
background-image:url(images/button%2001.gif);
}

#menu h2 a{
width: 145px;
color: #000;
text-transform: uppercase;
text-align:center;
background-image:url(./images/button%2002.gif);
}

#menu li {position:relative;}

#menu ul ul {
position: absolute;
z-index: 500;
background-image:url(./images/button%2002.gif);
}

#menu ul ul ul {
top: 0;
left: 100%;
background-image:url(./images/button%2002.gif);
}

div#menu ul ul,
div#menu ul li:hover ul ul,
div#menu ul ul li:hover ul ul
{display: none;
width:170px;
}

div#menu ul li:hover ul,
div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

can someone help? i'm starting to loose my hear :(

jkronika

unread,
Nov 23, 2009, 10:26:44 AM11/23/09
to Design the Web with CSS
Well, I can tell you right now that li:hover does not work in IE6 and
below. The hover psuedo-class is only supported for anchors (<A>) in
those browsers, and I'm not even sure whether it is correctly
supported for other elements in IE7 or IE8.

Depending how comfortable you are with JavaScript, you can go to
www.jquery.com and look up the Superfish plugin, which includes the
CSS and JavaScript necessary to make completely cross-browser
compatible flyover menus. The plugin homepage is here:
http://users.tpg.com.au/j_birch/plugins/superfish/
However, any JavaScript-related questions that may result should be
posted to the appropriate group, since this one is meant for CSS only.

Good luck!

crni

unread,
Nov 25, 2009, 11:27:04 AM11/25/09
to Design the Web with CSS
Thanks fot the reply.
I manage somehow to make it work for the IE 7.
Did some ajustings and it worked.

I will go and see for sure that site you mentioned :)

Thanks!

On Nov 23, 4:26 pm, jkronika <jkron...@gmail.com> wrote:
> Well, I can tell you right now that li:hover does not work in IE6 and
> below. The hover psuedo-class is only supported for anchors (<A>) in
> those browsers, and I'm not even sure whether it is correctly
> supported for other elements in IE7 or IE8.
>
> Depending how comfortable you are with JavaScript, you can go towww.jquery.comand look up the Superfish plugin, which includes the

Douglas T

unread,
Nov 20, 2009, 8:12:48 AM11/20/09
to Design the Web with CSS
You're self closing your link text with a "/". <a href="http://
www.manded.rs"/>www.maned.rs
If the link doesn't enclose the link text the you can't click.
Should be <a href="http://www.manded.rs">www.maned.rs</a>

On Nov 19, 6:36 am, crni <zoran.ga...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages