SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2004
    Location
    berlin, germany
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu Item Text That Remains color when Frame is active

    Hello, and thank you for your help. I have programmed a new website, and I cannot figure out now to do this.
    I have a simple page, that is two frames, the left being the menuFrame, and the right being the mainFrame.
    I have a simple list of menu items in the leftFrame
    in courier.
    I have a link state, a hover state and link a: text that works,
    but what I want is that when the user clicks on, for example "FILMS",
    the text remains a darker color just when they are viewing that particular frame.
    I dont want to use a visited link,
    i just need this for navigation, that the person knows which frame they are on.
    I see this all over the web, look at the source, and I cannot seem to find it!
    Please help me. My deadline is Tuesday, and I am really sick of trying to figure this out. I thank you in advance for your time.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    This is usually easily accomplished without frames by having the page that you linked to having the appropriate link styled accordingly. Because the menu is on every page you just style the appropriate link for that page.

    Most sites don't use frames anymore and I would advise against them unless you have good reason. (Do a search on google and you can read the pros and cons yourself.)

    As your menuframe doesn't change to a new page then your css won't be able to change anything except the visited state which is not quite the same.

    You will therefore need to find a javascript that will change the link color on click and reset the other items to default. As my speciality is css and not js I won't offer a solution but you should be able to find plenty of scripts on the net to do the job. (Or one of the members here may chip in with some code or get this post moved to the js forum.)

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •