You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, May 18th 2004, 8:52pm

CSS drop down menus and konqueror

Hi all,

(I've asked this at several other forums without any conclusive answers or fixes to the problem.)

Anyone know of any problems with CSS drop down menus a la suckerfish (www.alistapart.com) and Konqueror?

Here's my CSS for this http://www.nzwebz.com/wikindx2 :
[code:1]body {
background : url("paper.jpg");
font-family : sans-serif;
}
ul {
padding : 0;
margin : 0;
list-style : none;
}
li {
float : left;
position : relative;
}
li ul {
display : none;
position : absolute;
top : 1.1em;
left : 0;
border : 4px #CCCC99 groove;
background : #ffcc99;
width : 7em;
}
li > ul {
top : auto;
left : auto;
}
li:hover ul, li.over ul{
display : block;
}

A:visited, A:link, A:active {
text-decoration : none;
color : #666666;
background : transparent;
display : block;
width : 7em;
}
A:hover {
text-decoration : none;
background : #ff9900;
color : white;
display : block;
width : 7em;
}
.clear {
clear : both;
}
.titleTable {
width : 90%;
}
.menuTable {
margin : 0 0 0 5%;
}
.menuli {
color : #ff9900;
}
.mainTable {
border : #ff9900 3px groove;
width : 90%;
}
h1, h2, h3, h4 {
color : #ff9900;
}[/code:1]

With the javascript (which needs work I know), it works with IE (with javascript fix), Netscape, Firefox and Mozilla but the drop downs won't work with Konqueror. Javascript is turned on in Konqueror in case it's anything to do with that.

I notice that even the suckerfish pretty example doesn't work in Konqueror (v3.1-12).

For what it's worth, with all the examples of CSS drop-down menus on the web, not a single one works with konqueror.

If this one can't be solved, can anyone point me in the direction of CSS drop-down menu tutorials with code that works on Konqueror (and other modern browsers). Many sites claim to work with Konqueror but don't.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Friday, May 21st 2004, 11:32am

Are you sure your script does what you expect?

I think all browsers except IE have getElementById, including KHTML, which means the condition will already be true at the evalutation of the first part.

Doesn't this work as well?
[code:1]
if (document.getElementById) // all DOM compliant browsers
{
}
else // IE
{
}
[/code:1]

Anyway, you could check bugs.kde.org for known CSS problems with KHTML, maybe some of the reports also contain workarounds.

Cheers,
_
Qt/KDE Developer
Debian User