Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / April 2008



Tip: Looking for answers? Try searching our database.

dynamic nav/drop-down...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
maya - 23 Apr 2008 21:59 GMT
hi,

I need help with a dynamic nav menu,
http://www.mayacove.com/design/nav/nav.html

it looks like I want it in IE 7, but in FF and IE 6 it's totally messed
up.. in FF the main-nav section looks fine, but the drop-downs are
totally messed up.. in IE6 for some reason the functionality is totally
messed up, I get JavaScript errors, I guess that's for JS group....;)

I adapted this from here,
http://www.javascriptkit.com/script/script2/2leveltab.shtml
which is for sub-menus that go horizontally right underneath main-nav..

I always have difficulties with this, would like to find a method that
works across all browsers... a kind of "formula" that can be applied to
all situations (whether sub-nav is vertical (drop-downs) or horizontal..
  if possible...;)

thank you very much...
maya - 23 Apr 2008 23:06 GMT
> hi,
>
[quoted text clipped - 16 lines]
>
> thank you very much...

for the FF problem, it's a padding problem... in this pg,
http://www.webmasterworld.com/forum83/5499.htm

the gray boxes in some of the messages render fine in FF, but I can't
replicate this, I can't find the css code for those gray boxes....

b/c if I just put this code,
font color="#000000" face="arial" size="2">That's the only way you’ll
get a box 300px wide with a border, and <b style="color: black;
background-color: rgb(187, 255, 255);">padding</b>. Doesn't that suck?
</font>

of course it looks nothing like how it looks in above url.. I can't find
css code for this element..  WHY can't FF treat padding as padding??????

thank you........
Jeff - 24 Apr 2008 12:59 GMT
> hi,
>
> I need help with a dynamic nav menu,
> http://www.mayacove.com/design/nav/nav.html

No Doctype! That means you are operating in quirks mode.

What box model the browser uses is dependent on the boxtype.

Mostly, you'll want to use the standards mode box model and you'll need
a strict doctype to trigger that.

  I don't really like the standards mode box model, where the width is
the width of the contents not that of the box. But it is consistent and
strict gets rid of some other inconsistencies between browsers.

  I'm not saying that will fix your problems, but you'll have a level
playing field.

> it looks like I want it in IE 7, but in FF and IE 6 it's totally messed
> up.. in FF the main-nav section looks fine, but the drop-downs are
> totally messed up.. in IE6 for some reason the functionality is totally
> messed up, I get JavaScript errors, I guess that's for JS group....;)

  Good luck with that.

> I adapted this from here,
> http://www.javascriptkit.com/script/script2/2leveltab.shtml
> which is for sub-menus that go horizontally right underneath main-nav..

I'd rewrite the submenus, so that instead of br's you have either a list
or a series of divs.

  Jeff

> I always have difficulties with this, would like to find a method that
> works across all browsers... a kind of "formula" that can be applied to
> all situations (whether sub-nav is vertical (drop-downs) or horizontal..
>   if possible...;)
>
> thank you very much...
Christian Kirsch - 24 Apr 2008 13:03 GMT
Jeff schrieb:
>> hi,
>>
[quoted text clipped - 4 lines]
>
> What box model the browser uses is dependent on the boxtype.

s/boxtype/doctype/
maya - 24 Apr 2008 15:08 GMT
> Jeff schrieb:
>>> hi,
[quoted text clipped - 6 lines]
>
> s/boxtype/doctype/

I do have a doctype
( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> )

I have no idea what s/boxtype/doctype/ refers to..

either way..  what I had to do for FF was wrap the <a> tags in <div>
tags.. for those FF respects the padding...;)

thank you very much...
Jonathan N. Little - 24 Apr 2008 15:24 GMT
> I do have a doctype
> ( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> )

Is is a new page? If so you are not "transitioning". Want consistent
rendering then quirks mode best be avoided.

http://en.wikipedia.org/wiki/Quirks_mode
Quirks mode - Wikipedia, the free encyclopedia

http://www.quirksmode.org/css/quirksmode.html
CSS - Quirks mode and strict mode

Signature

Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Beauregard T. Shagnasty - 24 Apr 2008 15:36 GMT
>> Jeff schrieb:
>>>> I need help with a dynamic nav menu,
[quoted text clipped - 8 lines]
> I do have a doctype
> ( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> )

..but an incorrect/incomplete one. See:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

and since these are new pages, use Strict, not Transitional.
http://tekrider.net/pages/faq.php?q=trans

> I have no idea what s/boxtype/doctype/ refers to..

Standard editor's note to correct an error.

> either way..  what I had to do for FF was wrap the <a> tags in <div>
> tags.. for those FF respects the padding...;)

Try again with a proper DOCTYPE.

BTW, you do know that approximately 10% of your visitors will see no
menu, correct?  Those with JavaScript disabled, or stripped by a
corporate firewall will have no navigation.

Signature

  -bts
  -Friends don't let friends drive Vista

maya - 24 Apr 2008 15:45 GMT
>>> Jeff schrieb:
>>>>> I need help with a dynamic nav menu,
[quoted text clipped - 24 lines]
> menu, correct?  Those with JavaScript disabled, or stripped by a
> corporate firewall will have no navigation.

hmmmm.. interesting...  I still dont get why some users disable
JavaScript (some corporate firewalls disable JavaScript?? THAT I didn't
know... what ARE all the evil things supposedly you can do with
JavaScript?????)

at any rate this is for a site I have to buld at work, the doctype they
actually use is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

can't tell folks at work, where we host a lot of sites, to stop using
JavaScript (so many third-party stuff we use now (that many sites all
over the place use now..) like for examle now for videos we use
BrightCove (http://www.brightcove.com/), when we run polls on the sites,
etc.. all that stuff uses JavaScript code..  I reckon that the users who
have JavaScript disabled are a small minority, I think it's very rare
nowadays for a website to not use JavaScript..)

thank you..
Bergamot - 24 Apr 2008 16:06 GMT
> hmmmm.. interesting...  I still dont get why some users disable
> JavaScript (some corporate firewalls disable JavaScript?? THAT I didn't
> know... what ARE all the evil things supposedly you can do with
> JavaScript?????)

I'll leave "evil" to someone else, but I'll tell you I have JS disabled
by default because about 90% of the JS out there is annoying crap that I
don't want to see.

That includes cumbersome drop-down menus. They are a big pain to use and
many times are poorly constructed and/or styled, which makes them an
even bigger pain to use.

> I reckon that the users who
> have JavaScript disabled are a small minority,

Yes, but that's no reason to dismiss them as unimportant, as you seem to
be doing.

> I think it's very rare
> nowadays for a website to not use JavaScript.

Using JS is not so much the issue as relying on it.

But this is all off-topic for this newsgroup. It's been discussed
numerous times in alt.html and other groups, so go to those archives for
more on the subject.

Signature

Berg

dorayme - 25 Apr 2008 00:55 GMT
> > hmmmm.. interesting...  I still dont get why some users disable
> > JavaScript (some corporate firewalls disable JavaScript?? THAT I didn't
[quoted text clipped - 19 lines]
>
> Using JS is not so much the issue as relying on it.

I agree with Bergamot 110% on all of this. I was slightly disappointed
with his refusal to look into the nature of evil though.

Signature

dorayme

Beauregard T. Shagnasty - 24 Apr 2008 16:59 GMT
<snippage>
>>> I do have a doctype
>>> ( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> )
[quoted text clipped - 15 lines]
> didn't know... what ARE all the evil things supposedly you can do
> with JavaScript?????)

Most people who disable it on purpose do it, as Berg mentioned, because
so many authors do annoying crap with it. However, with insecure
browsers (you know the one), hackers can write malicious JavaScript to
do nasty things to your computers. That's why some companies strip it
out.

> at any rate this is for a site I have to buld at work, the doctype
> they actually use is:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Why XHTML? [Why Transitional?] See this page:
http://tekrider.net/html/doctype.php

> can't tell folks at work, where we host a lot of sites, to stop using
> JavaScript (so many third-party stuff we use now (that many sites all
[quoted text clipped - 3 lines]
> users who have JavaScript disabled are a small minority, I think it's
> very rare nowadays for a website to not use JavaScript..)

None of mine use it. If you do, it should only be used for fluff, and
not for anything that actually hinders toe operation of your site.

Regarding your drop-down menu, go hire a tester with motor deficiencies
and see how they do with it. Or try navigating it without a mouse.

Google for usability and accessibility studies.

Signature

  -bts
  -Motorcycles defy gravity; cars just suck

Beauregard T. Shagnasty - 24 Apr 2008 17:20 GMT
Beauregard T. Shagnasty replies to hisself:

> actually hinders toe operation

s/toe/the   <lol>  Or test the page with your toes instead of your hand.

Signature

  -bts
  -Friends don't let friends drive Vista

Jonathan N. Little - 25 Apr 2008 17:11 GMT
> Beauregard T. Shagnasty replies to hisself:
>
>> actually hinders toe operation
>
> s/toe/the   <lol>  Or test the page with your toes instead of your hand.

I liked it better as 'toe' ;-)

Signature

Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

salmobytes - 24 Apr 2008 15:53 GMT
An issue to think about:

If you make dropdown menus with javascript or flash, they will be
invisible to
search engines. And if your pages are invisible to search engines, no
one
will ever look at htem.  So you either have to *also* build a static
site map,
that points to everything, or you can build the dropdown menus with
css techniques, rather than client-side processing.

Look at positioniseverything.net (think that's the name) for
examples of (nearly) pure css dropdowns.  You still have to do
a bit of javascript hacking to make their solution work for IE6.
But that part is not a search engine impediment.
maya - 24 Apr 2008 16:32 GMT
> An issue to think about:
>
[quoted text clipped - 11 lines]
> a bit of javascript hacking to make their solution work for IE6.
> But that part is not a search engine impediment.

very nice!!
http://www.positioniseverything.net/css-dropdowns.html

will certainly try this..  thank you very much...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.