Discuss Anything: Drop Down Menu Help Please - Discuss Anything

Jump to content


Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Page 1 of 1

Drop Down Menu Help Please Rate Topic: -----

#1 User is offline   lonebyrd 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 124
  • Joined: 07-April 06
  • Gender:Female
  • Location:Northeast, USA
  • myCENT:90.21
  • Current Mood: Current Mood: None Chosen

Posted 03 February 2009 - 02:53 AM

I want to make a drop down menu and I thought I could do it with PHP. I only know HTML and some CSS and have been working on learning PHP. Is there a good place to find examples without having to search through every page? I'm tired of going to sites only to have to search forever and not even find anything. I know W3School is a good site but I don't see anything about drop down menus. So what I am really looking for is a good place with lots of examples of a variety of scripts.
0


Page 1 of 1

Other Replies To This Topic

#2 User is offline   pasten 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 119
  • Joined: 19-September 06
  • Gender:Male
  • Location:In front of my monitor.
  • myCENT:34.77
  • Current Mood: Current Mood: None Chosen

Posted 03 February 2009 - 05:09 PM

Drop downs are something which happens in the visitor's browser. And PHP is used for dynamic page generation which actually happens in the website's server. You can't make drop downs using PHP (appearance not content wise, but that too using either CSS/Javascript). But there's something to cheer up for you. You can create very nice drop down using CSS only. As for the examples, you can find dozens of menu's at CSS Play.
0

#3 User is offline   Veradesigns 

  • Premium Member
  • PipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 182
  • Joined: 03-February 09
  • Gender:Male
  • Location:San Diego
  • myCENT:24.57
  • Current Mood: Current Mood: None Chosen

Posted 03 February 2009 - 05:25 PM

There are many ways to make drop down menu,
you can use adobe flash to make a abnormal flash menu or java script my personal because they come ready. This is the link for you to get a few
http://javascript-ar...drop_down_menu/
0

#4 User is offline   lonebyrd 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 124
  • Joined: 07-April 06
  • Gender:Female
  • Location:Northeast, USA
  • myCENT:90.21
  • Current Mood: Current Mood: None Chosen

Posted 03 February 2009 - 05:54 PM

can java just be added to a regular HTML page or is there something special I need to do? I nothing of java script. From the page you directed me to Veradesigns, it looks like all HTML. But I have to use CSS also. It looked a little confusing at first, I need to take a better look at it. It has been over a year since I did any programming and I wasn't that great to begin with :P
0

#5 User is offline   lonebyrd 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 124
  • Joined: 07-April 06
  • Gender:Female
  • Location:Northeast, USA
  • myCENT:90.21
  • Current Mood: Current Mood: None Chosen

Posted 03 February 2009 - 11:00 PM

View PostVeradesigns, on Feb 3 2009, 01:25 PM, said:

There are many ways to make drop down menu,
you can use adobe flash to make a abnormal flash menu or java script my personal because they come ready. This is the link for you to get a few
http://javascript-ar...drop_down_menu/


I have to make a separate CSS style sheet to do this right? I understand that the first part goes in the body, but the CSS I am still a little confused about.
0

#6 User is offline   galexcd 

  • Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
  • PipPipPipPipPipPipPipPipPipPipPip
  • View gallery
  • Group: [MODERATOR]
  • Posts: 1,328
  • Joined: 25-September 05
  • Gender:Male
  • Location:Los Angeles, California
  • myCENT:44.33
  • Current Mood: Current Mood: None Chosen

Posted 04 February 2009 - 02:30 AM

View Postlonebyrd, on Feb 3 2009, 10:54 AM, said:

can java just be added to a regular HTML page or is there something special I need to do? I nothing of java script.

First of all make sure you don't confuse java with javascript. They are completely different languages and any website that uses java for navigational links will certainly lose me as a visitor. Javascript allows the browser to modify the webpage in ways HTML and CSS cannot. You might want to read the first few pages of this webpage to get a general overview of javascript.


View Postlonebyrd, on Feb 3 2009, 04:00 PM, said:

I have to make a separate CSS style sheet to do this right? I understand that the first part goes in the body, but the CSS I am still a little confused about.

The link Veradesigns provided is very useful, but I don't think it will help you learn how to make one in the future too well. The best way of learning something is to do it yourself, and I'd like to help you do that.

You said you already know HTML and CSS so you should be able to start out with this yourself:
1. Create your nav bar with the links that are going to call the drop down menus.
2. Create a few absolute-positioned div layers positioned under each of the links and fill them with the sub-menu items of your choice.
3. Give all those div layers their own unique ID using the ID attribute.
4. Set the style of all these div layers to be hidden, so they are not visible until you want them to be.

Now, after you do this you have a choice of which direction you want to go it. You can use CSS for basic drop-down menus, or if you decide to use javascript you can have a bit more control over these drop-down menus.(such as adding animation or fade in/out).

If you choose to use CSS add an class attribute to each of the links and use the :hover property to have the div layers to be visible.
For example:
<a href="#" class="stuff1">Stuff</a>
<div id="div1">Stuff1<br>Stuff2<br>Stuff3</div>
 ---- And in your head or another file:----
<style type="text/css">
.div1{display:none}
.stuff1:hover .div1{display:block;}
</style>


Now if you choose to use javascript you can use functions to show or hide the div layers using onMouseOver and onMouseOut:
<a href="#" onMouseOver="show()" onMouseOut="hide()">Stuff</a>
<div id="div1">Stuff1<br>Stuff2<br>Stuff3</div>
 ---- And in your head or another file:----
<script type="text/javascript">
function show(){
document.getElementById("div1").style.display="block";
}
function hide(){
document.getElementById("div1").style.display="none";
}
</script>


Now if you do decide to go with javascript and you are going to have multiple drop down menus you probably want to pass something to the function so javascript knows which submenu to display like this:
<a href="#" onMouseOver="show(1)" onMouseOut="hide(1)">Stuff</a> <a href="#" onMouseOver="show(2)" onMouseOut="hide(2)">Other</a>
<div id="div1">Stuff1<br>Stuff2<br>Stuff3</div><div id="div2">Other1<br>Other2<br>Other3</div>
 ---- And in your head or another file:----
<script type="text/javascript">
function show(i){
document.getElementById("div"+i).style.display="block";
}
function hide(i){
document.getElementById("div"+i).style.display="none";
}
</script>


Let me know if you have any questions or want me to explain something in greater detail.
0

#7 User is offline   jlhaslip 

  • Insert Custom Title Here
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: [MODERATOR]
  • Posts: 5,035
  • Joined: 24-July 05
  • Gender:Male
  • Location:Linux, DOS and Windows…the good, the bad and the ugly
  • Interests:http://jim.haslip.googlepages.com/home
  • myCENT:43.02
  • Spam Patrol
  • Current Mood: Current Mood: None Chosen

Posted 04 February 2009 - 03:21 AM

Of course, you could head over to http://cssplay.co.uk for grab a CSS version of Standard Compliant Drop Downs.
0

#8 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 18 February 2010 - 09:40 AM

Need drop down menuDrop Down Menu Help Please

The html file is :

<div id="header">  <div class="logo">NorthStar-EHS<br /><div class="sub">Environment Solutions</div></div>  <div class="menu">   <ul> <li><a href="#"><div class="links">About Us</div></a></li>    <li><a href="#"><div class="links">Services</div></a></li>    <li><a href="#"><div class="links">Products</div></a></li>    <li><a href="#"><div class="links">Enquiry</div></a></li>    <li><a href="#"><div class="links">Contact Us</div></a></li>   </ul>  </div></div>

 

The css used is :

#header{Background:url(images/menu_bg.Jpg) repeat-x;Height:56px;Width:910px;Margin:0 auto;}.Logo{Font-family:Georgia, "Times New Roman", Times, serif;Font-size:30px;Padding-top:3px;Padding-left:5px;Width:280px;Color:#FFFFFF;Float:left;}.Sub{Font- family:Verdana, Arial, Helvetica, sans-serif;Font-size:12px;Width:280px;Color:#FFFFFF;Text-align:right;}.Menu{Width:620px;Float:right;}. Menu ul{List-style-type:none;Margin:0px;Padding:0px;Width:620px;Text-align:right;}.Menu ul li{Float:left;Display:block;Width:120px;Border-left:solid 1px #1a3857;}.Menu ul li a{Display:block;Text-align:center;Color:#CCCCCC;Font-family:Verdana, Arial, Helvetica, sans-serif;Text-decoration:none;Font-weight:bold;Font-size:13px;Height:56px;}.Menu ul li a:hover{Color:#FFFFFF;Height:56px;Background:url(images/menu_over.Jpg) repeat-x;}.Links{Padding-top: 17px;}

 

I need 7 drop links under Services Link. Please help by code. The menu style should not be changed. To see it in working condition please browse :

http://www.Crazywebo...nment/index.Php

Drop menu should be under services link. Please help if u can.

 

Anil


0

Share this topic:


Page 1 of 1


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
New Replies Icon Attachments Menu Tabs * * * * *
Menu tabs tutorial using the sliding doors method
Tutorials Baniboy 
  • 9 Replies
  • 775 Views
*New Replies Icon java menu General Talk Guest_existenz_* 
  • 3 Replies
  • 2,577 Views
New Replies Icon Drops Of Jupiter Spoof By Yours Truly :d
Now that he's back in the atmosphere, his hair is soaked with ashl
Art & Creativity Mermaid711 
  • 1 Reply
  • 1,087 Views
New Replies Icon Editing Drop Down Menu In Php PHP Programming apple 
  • 3 Replies
  • 5,612 Views
New Replies Icon Drop Down Menu: Help Needed Website Discussion Evolke 
  • 3 Replies
  • 470 Views
New Replies Icon Help With Nav Menu Error HTML, XML etc.. randomdood 
  • 5 Replies
  • 973 Views
New Replies Icon Submit Form Thorugh Jum Menu Java, Java Servlets, Java Script, & JSP kvarnerexpress 
  • 0 Replies
  • 2,232 Views
New Replies Icon Have You Ever Drop Your Cellphone In The Toilet? General Talk Parubilla 
  • 6 Replies
  • 732 Views
New Replies Icon Help With Css Sytelsheet
Need to create a #right menu box thingy
CSS (Cascading Style Sheets) DJM 
  • 3 Replies
  • 80 Views
Locked Topic Icon Dropdown Menus Links
IDK how to make them link
HTML, XML etc.. Static_Fury 
  • 3 Replies
  • 1,721 Views
New Replies Icon Drop Down Menu Generator
ITs free
Java, Java Servlets, Java Script, & JSP alexia 
  • 4 Replies
  • 4,150 Views
New Replies Icon Multiple Drop Down Lists ?
Multiple drop down lists to take user to new page
PHP Programming claireb85 
  • 4 Replies
  • 1,100 Views
New Replies Icon Css Menu -- A Little Help Needed
i want a cool menu
CSS (Cascading Style Sheets) matak 
  • 5 Replies
  • 1,162 Views
New Replies Icon Internet Explorer 9 Drops Xp Users But Adds Html5 Support Web Browsers BuffaloHelp 
  • 8 Replies
  • 314 Views
Hot Topic (New) Icon need help with drop down menus!! HTML, XML etc.. holyium 
  • 17 Replies
  • 9,109 Views
New Replies Icon How Do I Disable Text Input Control In Vb 2008?
Menu Driven APP In vb 2008
VB Programming lfc1825 
  • 3 Replies
  • 368 Views
New Replies Icon Boot Menu Has A Stuck Os
Remove it right away with this trick.....
Operating Systems ragav.bpl 
  • 5 Replies
  • 2,177 Views
New Replies Icon Attachments Helpful Registry Edit For Java Programmers
Command Prompt on right click menu
Java, Java Servlets, Java Script, & JSP pasten 
  • 3 Replies
  • 4,575 Views
New Replies Icon How Do You Make A Dropdown Menu?
with css
CSS (Cascading Style Sheets) DjLuki 
  • 13 Replies
  • 1,831 Views
New Replies Icon Java Script Drop Down Menu With Css
- a full code for a dynamic drop down
Java, Java Servlets, Java Script, & JSP nickmealey 
  • 2 Replies
  • 4,325 Views

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Google Fan :-) We Recommend Firefox.     Customize / Settings Connect Us on facebook