Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2008
    Posts
    127
    Thanks
    2
    Thanked 0 Times in 0 Posts

    css and the body tag

    Hi

    I have a side menu where I have set the properties for li as I wish and also for "a:hover" and "a"

    I want it so when the use clicks on a page for example <body class="home"> it the hover over color will remain on.

    I know it will be doing something with the body class but I just can't seem to grasp it and any help in the right direction will be greatly appreciated.

    thanks

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    If you look at this program of mine, you will find that a selected item remains it's red colour. This is I believe because the event is recorded in the Cache. I know it is a long shot as it happened to me without any intent on my part.

    Won't cost anything to look anyway.

    It's here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello SteveDD,
    Here's a few example of menus that highlight the page your on. They all use the same method of id'ing the page with the body tag ...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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