473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CSS-only dropdown menus

I'm toying a bit with a horizontal CSS-dependant dropdown menu. See
<http://santek.no-ip.org/~st/tests/CSS/cssmenus.php>.

Gecko's lack of support of display:inline-block is too bad, but aside
from that both Mozilla 1.7.5 and Opera 8.0 (for Mac, build 1945) for
some reason do not draw the third level's background and borders unless
you hover over them. iCab and Safari do (as can be seen in the
screenshot on that page).

I wonder why. Seems to be an inheritance thing, but I'm not sure which
behaviour is correct: Mozilla and Opera's, or iCab and Safari's?

--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
Jul 21 '05 #1
3 2023
Sander Tekelenburg wrote:
I'm toying a bit with a horizontal CSS-dependant dropdown menu. See
<http://santek.no-ip.org/~st/tests/CSS/cssmenus.php>.

Gecko's lack of support of display:inline-block is too bad [...]


Why don't you use display:block?

Chris
Jul 21 '05 #2
> > I'm toying a bit with a horizontal CSS-dependant dropdown menu. See
<http://santek.no-ip.org/~st/tests/CSS/cssmenus.php>.

Gecko's lack of support of display:inline-block is too bad [...]


Why don't you use display:block?


Because display:block will give you a vertical menu, not a horizontal
one.

I use display:inline like this:

li.menubutton { display: inline; position: relative; }
ul.dropdownmenu { display: none; }
li.menubutton:hover ul.dropdownmenu { display: block; position:
absolute; }

<ul class="menubar">
<li class="menubutton">
Menu1
<ul class="dropdownmenu">
<li>fe</li>
<li>fi</li>
</ul>
</li>
<li class="menubutton">
Menu2
<ul class="dropdownmenu">
<li>fo</li>
<li>fum</li>
</ul>
</li>
</ul>

It seems to work (I use the csshover.htc hack for IE), but I suspect
that I am breaking some rules somewhere. Any comments?

--Phil.

Jul 21 '05 #3
Hi,
I'm toying a bit with a horizontal CSS-dependant dropdown menu. See
<http://santek.no-ip.org/~st/tests/CSS/cssmenus.php>.

Gecko's lack of support of display:inline-block is too bad [...]


Why don't you use display:block?


Because display:block will give you a vertical menu, not a horizontal
one.


And if you try to float:left the block? This should behave like
inline-block.

But if your solution works, great!

Chris
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: andy johnson | last post by:
Hi All, I called an external stylesheet main.css, created the html files and checked them locally OK. I uploaded everything to the server. When I checked it, the connection kept crashing. I...
59
by: Mason A. Clark | last post by:
Is there information content in this observation? use html tables for layout: http://www.microsoft.com and http://www.netscape.com uses styles: http://www.opera.com
1
by: Jocab | last post by:
Just had a look at the Wired.com site and it seems it's completely in XHTML and CSS. I don't understand this snippet of code on their homepage, though: <link rel="stylesheet" type="text/css"...
36
by: Peter Brause | last post by:
Hello, my stylesheet shows different colors for visited, active and hovered links. It works fine in IE 6, but in Opera 7 the color for the active link (red background) is never shown. How to...
48
by: David J Patrick | last post by:
I'm trying to rewrite the CSS used in http://s92415866.onlinehome.us/files/ScreenplayCSSv2.html. using the w3.org paged media standards as described at http://www.w3.org/TR/REC-CSS2/page.html ...
7
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
3
by: nick | last post by:
I have the following code in my master page: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
4
by: puja | last post by:
hi all, I have an asp.net website where am including .css file dynamically on page load event. For diff users, there is diff CSS file. So after user logs in, I am setting CSS href on page load....
1
by: shapper | last post by:
Hello, I created a theme folder where I place my Skin and CSS files. I have 5 files: Base.skin, Base.css, Default.css, Contacts.css, Print.css Base Skin and CSS files should be used on...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.