HighDots Forums  

CSS-only dropdown menus

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS-only dropdown menus in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sander Tekelenburg
 
Posts: n/a

Default CSS-only dropdown menus - 01-31-2005 , 07:30 AM






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/>

Reply With Quote
  #2  
Old   
Chris Leipold
 
Posts: n/a

Default Re: CSS-only dropdown menus - 02-01-2005 , 04:11 AM






Sander Tekelenburg wrote:
Quote:
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


Reply With Quote
  #3  
Old   
phil_gg04@treefic.com
 
Posts: n/a

Default Re: CSS-only dropdown menus - 02-01-2005 , 09:06 AM



Quote:
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.



Reply With Quote
  #4  
Old   
Chris Leipold
 
Posts: n/a

Default Re: CSS-only dropdown menus - 02-01-2005 , 10:11 AM



Hi,
Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.