Jump to content

Urgent !!! A menu feature on HTML or XHTML


pandean

Recommended Posts

Hi, GuysI am a newbie of dynamic website. I have seen a menu effects was very cool and useful. but dont know how to create this. The immediate help will be appreciated.My problem is:When a user clicks a link on a menu, the link itself will be bold and remains the same effect on the next page. The same effect can be found at www.w3schools.com I really like this effect, but I dont know which script language I should use to achieve it. Do I have to use PHP or ASP to do it ? or just HTML and CSS?Thanks in advance.P

Link to comment
Share on other sites

I really like this effect, but I dont know which script language I should use to achieve it. Do I have to use PHP or ASP to do it ? or just HTML and CSS?
You can do it with php but also css :) So say you have four pages, what you need to do is give the <body> tag on each page a unique id aswell as each menu item. Then in the stylesheet find out what the current page is and style that link.http://scott100.atspace.com/home.htmSo for example if the body id is <body id="home"> within that document find the anchor link with id="homenav" and style it boldThis is the css file:body#home a#homenav,body#products a#prodnav,body#faq a#faqnav,body#contact a#connav {font-weight: 900;}
Link to comment
Share on other sites

Guest Dendai † RedDeath
What does that mean? Can you please explain it for me?ThanksP

He means, supposing you have it listed right now as:
<a href="http://blah">HOME</a><a href="http://blah">Guide</a><a href="http://blah">Page1</a><a href="http://blah">Page2</a><a href="http://blah">Gallery</a>

and you are on the home page, all you have to do is change it to:

<b>HOME</b><a href="http://blah">Guide</a><a href="http://blah">Page1</a><a href="http://blah">Page2</a><a href="http://blah">Gallery</a>

then lets say that the person clicks on 'Page1'. the code on page one merely needs to read:

<a href="http://blah">HOME</a><a href="http://blah">Guide</a><b>Page1</b><a href="http://blah">Page2</a><a href="http://blah">Gallery</a>

does that make more sense? :)

Link to comment
Share on other sites

You can do it with php but also css  :) So say you have four pages, what you need to do is give the <body> tag on each page a unique id aswell as each menu item.  Then in the stylesheet find out what the current page is and style that link.http://scott100.atspace.com/home.htmSo for example if the body id is <body id="home"> within that document find the anchor link with id="homenav" and style it boldThis is the css file:body#home a#homenav,body#products a#prodnav,body#faq a#faqnav,body#contact a#connav {font-weight: 900;}

This is what I want.. thank you so muchP
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...