I want to create a navigation for a website that will have a primary navigation that when you mouse over on that another set of sub options will apply.
I need to have this menu appear on ever single page of the site.
I know html, css, photoshop, and flash. If the technique involves more than those I would appreciate it if you could be a little more detailed in that.
2nd level navigation
Started by RustyNail, Jun 27 2005 07:28 PM
8 replies to this topic
#1
Posted 27 June 2005 - 07:28 PM
#2
Posted 27 June 2005 - 07:38 PM
Do a quick search for "DHTML Drop Down Menus" and you'll find what you're looking for
#3
Posted 27 June 2005 - 08:24 PM
Check www.guistuff.com, they have some DHTML drop-down box generators.
If you need it to appears on each page, using frames would be the easiest way but more optimized way would be to use a php include().
If you need it to appears on each page, using frames would be the easiest way but more optimized way would be to use a php include().
#4
Posted 28 June 2005 - 05:17 PM
The problem with frames is that if someone searches for one of the products, they will just get the frame with the product and nothing else. I suppose i could put somekind of link at the top of each page that says, click here if you came from a search engine but that seems kind of unprofessional.
Is there a way to get around this?
Could I some how make the nav with an image or I have heard of a php script that would put something on every page like frames?
Like I said I don't know php so if this is the best option I would appreciate some detailed help.
Is there a way to get around this?
Could I some how make the nav with an image or I have heard of a php script that would put something on every page like frames?
Like I said I don't know php so if this is the best option I would appreciate some detailed help.
#5
Posted 28 June 2005 - 06:32 PM
even if don't know PHP, its really easy to use that feature.
1) Simple copy the code of the navbar and put it in a file with no html coding (like , don't put that stuff)
Put at the end. Save the file as PHP. (.php)
2) In each file you want to put that navbar, simply put:
thats all, your navbar will appear everywhere you put that little code. Don't forget to save all your files as .php as well.
1) Simple copy the code of the navbar and put it in a file with no html coding (like , don't put that stuff)
Put at the end. Save the file as PHP. (.php)
2) In each file you want to put that navbar, simply put:
<?php include("YOURFILE.PHP"); ?>
thats all, your navbar will appear everywhere you put that little code. Don't forget to save all your files as .php as well.
#6
Posted 28 June 2005 - 08:18 PM
Just one addition to what he said, set up your included page like this:
YOURFILE.PHP:
Or you'll get a parse error
YOURFILE.PHP:
<?php echo 'Paste your html stuff in here'; ?>
Or you'll get a parse error
#7
Posted 29 June 2005 - 04:29 PM
Thanks a lot.
I just want to make sure I understand something though
If I am right about this you don't need to reply just correct me if I'm wrong.
The pages other than the header will have a general template like this:
<html>
<head></head>
<?php
<?php include("nav.PHP"); ?>
<!--normal html for the page goes here-->
?>
</html>
saved as page.php
Thanks a lot for the help I will experiment with this becuase it will definetly come in handy for other sites that I would do.
I just want to make sure I understand something though
If I am right about this you don't need to reply just correct me if I'm wrong.
The pages other than the header will have a general template like this:
<html>
<head></head>
<?php
<?php include("nav.PHP"); ?>
<!--normal html for the page goes here-->
?>
</html>
saved as page.php
Thanks a lot for the help I will experiment with this becuase it will definetly come in handy for other sites that I would do.
#8
Posted 29 June 2005 - 05:05 PM
hmmm, you've put 2 times a php tag. You only need 1.
and your nav.php file should be:
Thanks for fixing the little bug James lol
If your code is longer, you can just put no tag in your nav.php, so its just included, not parsed.
<html>
<head>
<title>your title</title>
</head>
<body>
<?php include("nav.php"); ?>
<!--normal html for the page goes here-->
</html>
and your nav.php file should be:
<?php echo 'Paste your html stuff in here'; ?>
Thanks for fixing the little bug James lol
If your code is longer, you can just put no tag in your nav.php, so its just included, not parsed.
#9
Posted 29 June 2005 - 06:09 PM
My bad. Thanks!
Hate to bother you guys again but when I search for these on google all I seem to get is menu genuratoring(spelling) programs. I will keep searching and I already checked on w3schools. I was just wondering if anyone had a link from when they learned how to do it.
edit: After quite a bit of searching I think I finally found what I'm looking for. Here is a link for anyone else having problems with this stuff http://www.alistapar...cles/dropdowns/
edit 2: There is a slight problem since I need a vertical menu and not the horizontal menu that this tutorial shows. Is it possible to make a layer change from bottom to top or remain on top but be invissible untill the mouse moves over a certain spot?
I don't know how to make it un hidden but I think I could put a transparent gif on top of each link that acts as some kindof a link that would activate on the rollover to make the hidden layer visible again. Seems like this code would get messy and I would have to learn a bunch of new stuff. i hope someone else a suggestion to help me again.
Hate to bother you guys again but when I search for these on google all I seem to get is menu genuratoring(spelling) programs. I will keep searching and I already checked on w3schools. I was just wondering if anyone had a link from when they learned how to do it.
edit: After quite a bit of searching I think I finally found what I'm looking for. Here is a link for anyone else having problems with this stuff http://www.alistapar...cles/dropdowns/
edit 2: There is a slight problem since I need a vertical menu and not the horizontal menu that this tutorial shows. Is it possible to make a layer change from bottom to top or remain on top but be invissible untill the mouse moves over a certain spot?
I don't know how to make it un hidden but I think I could put a transparent gif on top of each link that acts as some kindof a link that would activate on the rollover to make the hidden layer visible again. Seems like this code would get messy and I would have to learn a bunch of new stuff. i hope someone else a suggestion to help me again.
Edited by RustyNail, 29 June 2005 - 09:16 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
