Jump to content

Recommended Posts

I am looking for advice on how I should look at doing drop down menus for a website.

 

dHTML would be ok because at least I can make the javascript easier cross-plateform except I have troubles with getting the menus in the right spots when you 'onmouseover'

 

Pure CSS drop down menus would be nice but then I would have to worry about cross-platform issues like IE6 doesn't like the 'hover' attribute li tags (think that was the reason for the 'hack').

 

Anyway what can people suggest? (without 3rd party script) Looking mainly for tutorials or something I can play with and see what I can create. For some reason looking up 'dhtml horizontal menu tutorial' on google doesn't exactly show me what I want lol!

 

I can do drop down menus with javascript but they 'expand' the menu and not 'popup' a seperate <div> over top (so things don't get shifted around etc).

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/
Share on other sites

for more tutorials about this sort of thing, and to generally point out exactly how many "You HAVE to use JS for that!" things can be done in pure CSS, take a look here: http://www.cssplay.co.uk/menus.

 

 

Javascript is far from being in the past - it's one of the most useful elements in a modern, interactive site, used for all sorts of effects, drag and drop, AJAX, etc.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-327340
Share on other sites

There is no excuse for using Javascript as presentation. That was the stone age. Time to move on to CSS :)

I will not totally agree with that. CSS and html is like dumb beauty with no logic capabilities. Loads of "BIG" sites still use JS for presentation in some way. So we still live in the  "stone age".

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-327986
Share on other sites

Only stupid sites like microsoft still use javascript/activex for presentation. If a site won't even display right without javascript, it shouldn't even exist.

 

Gmail, Google Docs, Google Calendar etc. require Javascript...

 

Well, Gmail does have a HTML only version, but it's not nearly as good.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-328219
Share on other sites

Only stupid sites like microsoft still use javascript/activex for presentation. If a site won't even display right without javascript, it shouldn't even exist.

Which sites are stupid in your opinion?

Loads of big sites still use JS and many of us still consider flash sites cool which is worse than even JS. CSS is not yet the all solving guru. It can never be without in-built logic which unfortunately only IE supports. So much for worse browser.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-328738
Share on other sites

Only stupid sites like microsoft still use javascript/activex for presentation. If a site won't even display right without javascript, it shouldn't even exist.

 

Gmail, Google Docs, Google Calendar etc. require Javascript...

 

Well, Gmail does have a HTML only version, but it's not nearly as good.

I understand that Ajax is completely javascript driven and there's no way around that.

I'm talking about using it for presentation and links and stuff so that you can't even navigate the site without javascript, when CSS or plain HTML would have worked fine.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-329464
Share on other sites

If you are comparing css and javascript for simple things like rollovers, fine, you have a point, but I highly doubt anyone is still using javascript for rollovers.  I fail to see anywhere else that you can be making the comparison of js and css.  That's like saying php is better than html.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-329959
Share on other sites

What can HTML do that a programming language can't do?

 

Apples and oranges. It's like asking "What can a pencil do that an airplane can't?" HTML is not even remotely related to a programming language. It's simply a markup language, a pre-defined set of tags and attributes that our web browsers can read, and show us pretty pictures, colors, and words. All it's used for is formatting the information that you want to show.

 

But if you really want your question answered, though, HTML can, for example, output italicized text. I'd like to see you make PHP do that.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-332362
Share on other sites

Okay. Well I'm sure you can generate italic text with the GD library. Not sure exactly how, as I've never used it before, but I'm sure it can be done.

PHP should be able to detect what OS it's running on, and then open the picture of the text it made in an image viewer.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-334139
Share on other sites

Okay. Well I'm sure you can generate italic text with the GD library. Not sure exactly how, as I've never used it before, but I'm sure it can be done.

PHP should be able to detect what OS it's running on, and then open the picture of the text it made in an image viewer.

 

I suppose that it technically wouldn't be text then. It's just a number of e.g. black pixels on a white background arranged so you can read it as text. PHP cannot format text. That is just not what it is designed to do.

Link to comment
https://forums.phpfreaks.com/topic/64326-dhtml-or-pure-css/#findComment-334439
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.