Michael Brandon

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMichael Brandon
ToMe
SubjectPure CSS menus - your help would be appreciated
Date27 July 2003 14:59
Hi Tark

I found your site on Pure CSS menus, but I am having a small issue with it.
Apart from that, it looks cool. I just hope that enough people have the
browsers to be able to read it.
http://www.howtocreate.co.uk/tutorials/testMenu.html

When I have a url on the main parent tag, it creates a double line. Can I
have a url on the parent, as well as having a child set. Javascript/css not
my strong point.


See the menu item "man"
http://xxx.xxxxxxxxx.xx.xx/xxxxxxx/


It is something to do with the options on the following files:


Can you see the obvious issue and its resolution? Thanks for your help.

I have had fun with xxxxxxxxx - programmed myself in PHP and MySQL. Now top
of the Google SERPS for all "my" restaurants. So I am helping out some other
companies with optimising their websites. I enjoyed reading a little about
you & Becky on your personal site. I have 4 kids and I the humble age of
under 35..

Regards

Michael Brandon
FromMe
ToMichael Brandon
SubjectRe: Pure CSS menus - your help would be appreciated
Date28 July 2003 08:58
Michael,

It is possible, but it is a bit messy in Opera 7.

Sorry, I cannot see any menu item 'man', but I do see what you mean (after a quick edit).

You need to remove the IE specific comments from makemenu.css.
in makemenu.css;
change the display to inline in:
ul.makeMenu li a { ... display: block; ... }
and add the following line:
ul.makeMenu li > a { display: block; }

however, now that sub menu does not appear in Opera 7 ... let me think ...

this is an Opera bug. When li:hover and a:hover are both true, li:hover > ul
is not activated for some unknown reason. adding padding to the li will
help, but it is not perfect. If you move the mouse too fast, it will not
open/close properly.
padding: 1px 0px 1px 0px;

There are also a couple of bugs you are going to run into:
The menus do not work in IE5.0, but they do work in IE5.5 (IE5.0
positioning bug)
The 'consulting services' sub menu does not appear in Mozilla, Opera 7 or
Safari because you have put a </li> tag in too early:
	<li>Consulting Services</li> <-- that </li> should not be there
		<ul>
			... etc.
The sub menus need to be pushed 1px further to the left or they will not
work in Opera 7


Does all of this make sense?


Tarquin
FromMichael Brandon
ToMe
SubjectRe: Pure CSS menus - your help would be appreciated
Date28 July 2003 21:53
Thanks for the help Tarquin

It is certainly a nice menu structure, but unfortunately browser support is
problematic. Looked at my logs today and realised the number of people about
10% over 6000 in month, have IE 5.0 or 5.05.

Looks like I will be looking for another menu structure. 
I liked it that Google could see all the links since no Javascript used.

Anyway.
Any recommendations apart from me doing my own google searching?

Regards
Michael
FromMe
ToMichael Brandon
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 08:51
Attachmentpage with working example
You may find that you are better off using JavaScript and a display based
list menu. This can be done using plain HTML, which you style with CSS,
then control with JavaScript. The beauty of this is that it is pure HTML,
not HTML written with JavaScript, so it will be googled, as well as being
visible in ALL browsers, no matter what they support (provided you write it
to collapse _after_ the page has loaded, not by sniffing as they have done
on DynamicDrive).

The showing/hiding will work in IE4+, Opera 7+, iCab, Konqueror, Safari,
Mozilla etc.
Netscape 4, OmniWeb 4.2-, Escape, Clue, Opera 6- etc will show the menu
fully expanded.

I have attached an example using UL and LI tags, but you could use any tags
you want, so if necessary, you could use CSS positioning on div elements
etc. If necessary, you can also make unused sub menus automatically
collapse. Say if you want that, I will rewrite the script for you.
FromMichael Brandon
ToMe
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 09:15
Fantastic. Thanks Tarquin

I will be using it to fit within a 100 wide table (expanding down using
colours as the differential), and formatting it with the same sort of
colourscheme as currently

http://xxx.xxxxxxxxx.xx.xx/xxxxxxx/ 

The site is working on my laptop, haven't yet upgraded all the links on the
live site. The text area CM system doesn't like relative links. Bla. And
they don't like responding to email requests even when I have paid for the
product. http://xxx.xxxxxxxxxxxx.xxx/xxxx/xxxxxxxxxxx.xxx 

I'll take you up on the offer of the auto hiding. 

Thanks for your help

You wont know my Bro Stephen Brandon- but he lives in Glasgow with his Mrs
and son Benjamin. Your neck of the woods. He's into computer consultancy as
well.

Regards
Michael Brandon
FromMe
ToMichael Brandon
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 10:40
OK, what kind of auto hiding do you want? one that auto hides sibling
levels when a new level is opened, and/or one that auto hides if they stop
using the menu for 'n' seconds?
FromMichael Brandon
ToMe
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 10:50
How about using mouse over as first option, with second as auto hide when
new level. I like the idea of mouse over option to expand, rather than your
click to expand, but if there are compatibility issues with the mouse over,
will use mouseover, plus '+' sign besides it.

Thanks.

Are there any SEO optimisation hints I can give you as a swap. Send me to a
site and I'll write a short report. Or are you a pro as well?

Regards
Michael
FromMe
ToMichael Brandon
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 13:42
Attachmentpage with working example
If you want to add mouseover support ONLY WITH NESTED LISTS, just put a span
around the list item <ul>
	<li><span on... on...>hello</span>
		<ul>
			etc.
and make the span detect onmouseover and onmouseout events
onmouseover="toggleDis('lev2');" onmouseout="toggleDis('lev2');"

I warn you that you need to be careful using mouseovers. Some browsers
cannot use them (such as TV browsers . . .) because they have no mouse. For
that reason, I think you should have the plus symbol.

Also, there are issues when using mouseovers with nested lists: as a list
expands, it changes what was under the mouse, triggering further
mouseovers/outs, creating a very bad effect. If you want to use mouseovers,
you should use positioning to make the layout look good again, but remember
that then it will not work in Netscape 4 or equivalent browsers, and if you
position ULs or LIs, you will hit that IE 5.0 bug again.

If you want Netscape 4 support, you can manually create normal menus, but
use styled div elements, and change visibility instead of display (this is
all sounding a bit complicated isn't it?!). Sorry, I really don't have the
time to implement this properly, but you may be interested in my multi level
show hide menu
http://www.howtocreate.co.uk/tutorials/jsexamples/showhide.html
which works properly already, but does not close as neatly as I would like.

I think you would be better off with a plus symbol, but it is your choice.


Anyway, I have attached an updated script to do the auto collapsing - which
should not be used with mouseovers if you use nested lists.


Tarquin
FromMichael Brandon
ToMe
SubjectRe: Pure CSS menus - your help would be appreciated
Date29 July 2003 14:46
Thanks Tarquin

Looks like I have my work cut out again customising your fab efforts. I like
the latest one you have sent.

Thanks again.

Regards
Michael
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.