How to make my menu work good?!

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
lalalez
Forum Newbie
Posts: 2
Joined: Mon May 18, 2009 6:16 am

How to make my menu work good?!

Post by lalalez »

Hi everybody,

It's my first time here and I have a question for you guys:

I've created a header.php file (separatly) and I need to add code to this file, so that a little triangle appears in a menu, when a user clicks in its submenu.

Here is my code:

Code: Select all

<!DOCTYPE php PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<php xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/php; charset=utf-8" />
<title>My Company</title>
</head>
<body> 
<div id="header">
<div class="header-area">
<div class="header-content">
<div class="wrap">
<h1 class="logo"><a href="index.php">Company</a></h1>
<em>My Company</em>
<form action="">
<fieldset class="form">
<div>
<input class="text" type="text" value="search"/>
</div>
<input class="img" type="image" src="images/btn-go.gif"/>
</fieldset>
</form>
</div>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="#">About us</a>
<ul>
<li><a href="overview.php">Overview</a></li>
<li><a href="partnerships.php">Partnerships</a></li>
</ul>
</li>
<li> <a style="background:url(images/icon-active.gif) no-repeat 50% 100%;" class="MenuBarItemSubmenu" href="#">SERVICES</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="services.php">Services</a></li>
<li><a href="it.php">IT</a></li>
<li><a href="1.php">Center</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">TRAININGS</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="calendar.php">Calendar</a></li>
<li><a href="Training1.php">T1</a></li>
<li><a href="Training2.php">T2</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="#">NEWS & EVENTS</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="calendar.php">Calendar</a></li>
<li><a href="news.php">Current News & Events</a></li>
<li><a href="archives.php">Archives</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</body>
</php>
 

Can anybody tell me which code should I add here (if statements...??) and where to put it in my code?

Thanks :)
Last edited by Benjamin on Mon May 18, 2009 10:09 am, edited 1 time in total.
Reason: Changed code type from text to html.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: How to make my menu work good?!

Post by jayshields »

You'll need to use JavaScript and CSS. Start by looking at existing solutions and adapt them to fit your needs.

Search Google for things like hierarchical menu, sub menu, cascading menu, JavaScript menu, CSS menu, etc, etc.
lalalez
Forum Newbie
Posts: 2
Joined: Mon May 18, 2009 6:16 am

Re: How to make my menu work good?!

Post by lalalez »

Well... I searched and didn't succeed to find the answer... That's why I posted here :(

Please, if somebody knows the answer... let me know immediately !


Thanks,
L
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: How to make my menu work good?!

Post by jayshields »

No one is going to code it for you.

If you don't know anything about JavaScript or CSS I suggest you learn the basics of those two technologies first and then follow the advice I gave in my previous post - you could quite easily find an example on the Web which resembles what you want (even if you have to steal it from somewhere).
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to make my menu work good?!

Post by Benjamin »

:arrow: Moved to Volunteer Work
Post Reply