SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: The 'On' Button

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Location
    Texas, USA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question The 'On' Button

    I'm sure there is a very simple answer to this question, but I thought I'd ask anyway, so here it goes...I know you can do image rollovers with CSS, but how do you get the 'on' button to stay on? For example, I put my cursor on a link and it changes color, then I click on that link and the link stays the same color (or changes color) on the next page to show what page you are currently on. Does this make sense? How can I do this with CSS? Is it possible to do without using images?

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post your code and/or provide a link?

  3. #3
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can either attach an ID or class to the link that is 'active' and style that or you can assign an ID to the body of the page and then target the link that way, e.g.:

    body#pageOne a#pageOneLink { different style; }

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're posting code, it's better to copy it into the [ code ] tags cos otherwise you have to wait for your attachments to be approved.


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
  •