How can I get a menu link to show active state in Spry?

I want to have my Spry menu bar show the page I am on as a highlighted with background-color and text-color being highlighted and different than the rest of the menu bar. It seems that there are two ways that people talk about doing this.
One is to modify the a:hover and a:focus styles in the Spry assets. If this is the answer, I am missing something. After much experimentation, I actually created a style for a:hover (which is rollover only) and a:focus (which is when you click on the bar). It has no bearing on the state of the menu when it is showing the page as the page the user is on. If someone can give me a clue whether the CSS in Spry assets is the way to go, please provide specific code that would go in a specific place. Generalities are not helping me go to a specific solution.
The other way to go seems to give the body an ID on each page. There is a thread here: <http://www.highdots.com/forums/macromedia-dreamweaver/using-css-highlight-current-page-227 823.html>
It says:
"Example:
<body id="home">
This is because the CSS is:
#home #menu .home a
background-color:#ED2424;
color: #E7E63E;
That means color the <a> tag with the class home, inside the #menu container,
inside the #home container which is the body.
Without giving the body an ID, there is no "home" container so the CSS doesn't
apply to anything."
If this is correct, where do each of these snippets of code actually go? Does this apply to Spry? I would assume that the body id is in Source Code, and the others are in CSS. But where?
There is also another solution posted elsewhere: <http://css-tricks.com/id-your-body-for-greater-css-control-and-specificity/>
What specific advice can you provide to get a web site to do something that is pretty basic from the perspective of the user?
Nv

<!DOCTYPE html>
<html>
<head>
<title>Untitled Document</title>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet">
<style>
ul.MenuBarHorizontal li.MenuBarActive a { 
    background: #F00;
    font-weight: bold;
</style>
</head>
<body>
<ul id="MenuBar1" class="MenuBarHorizontal">
  <li class="MenuBarActive"><a class="MenuBarItemSubmenu" href="#">Home</a>
    <ul>
      <li><a href="#">Item 1.1</a></li>
      <li><a href="#">Item 1.2</a></li>
      <li><a href="#">Item 1.3</a></li>
    </ul>
  </li>
  <li><a href="#">Item 2</a></li>
  <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
    <ul>
      <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
        <ul>
          <li><a href="#">Item 3.1.1</a></li>
          <li><a href="#">Item 3.1.2</a></li>
        </ul>
      </li>
      <li><a href="#">Item 3.2</a></li>
      <li><a href="#">Item 3.3</a></li>
    </ul>
  </li>
  <li><a href="#">Item 4</a></li>
</ul>
<script src="SpryAssets/SpryMenuBar.js"></script>
<script>var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});</script>
</body>
</html>
So that you do not have to repeat the style rules in every document, add the rules to the existing SpryMenuBarHorizontal.css. The class is added to the menu item that has the current document, in our case above it will be index.html or similar. The class will be placed on menu items that correspond to the current page.
Gramps

Similar Messages

  • How can I get my century link email on my iPhone under mail?

    How can I get my century link email ([email protected]) to come on my iphone in Mail and not accessing it through safari?

    Contact your mail provider for the correct settings to use, and go to Settings>Mail, Contacts, Calendars and add the account.

  • How can I get the direction handles to show up for the Position attribute?

    How can I get the direction handles to show up for the Position attribute?
    I have CS3 and I did the formentioned test and was able to make the handles work for the scale attribute but they don't seem to show when editing the position values.
    *I am in the graph editor looking at the "value graph"
    *I select the keys and convert the keys to auto bezier (I also tried the ease in and out buttons)
    *It changed the graph the way you might think (no longer linear) however the handles are not showing to edit further.
    *I also tried using the "convert vertex tool" (part of the pen tool) and still no luck getting those handles.
    *the handles only show up in the speed graph but that does me no good.
    Please help!
    THANKS 

    I don't have CS3 installed on any of my machines any more but your value graphs for position should look something like this:
    There are no handles for position in the Graph editor. You adjust the position curve by editing the motion path in the composition window. Press the G key to bring up the pen tool, then use the modifier keys Crtl/Cmnd and Alt/Option to temporarily switch between select and convert vertex to adjust the paths. Changes will be reflected in the value graphs. You will get editable handles with scale and rotation because these are not spatial properties. Spatial properties, position, Anchor Point, all XY & Z coordinates are edited in the comp window or in the layer window after revealing the properties. IOW, you edit anchor point position paths by opening up the layer window and choosing Anchor Point from the display options.
    The Manual isn't wrong. Here's a link to the live docs.

  • How can I get my RSS feeds to show up on my iOS devices from iCloud?

    How can I get my RSS feeds to show up on my iOS devices from iCloud?  The RSS feeds now show up just fine on my iMac. 
    On my iMac the appear in a category at the same level as In Box, Sent, etc.  However the term RSS is in lighter grey like Mailboxes, On My Mac, Reminders.  I use Snow Leopard 10.7.5.  Any help will be appreciated as I'd like to read the feeds on my iPad 2 and iPhone 5 when I'm away from home.
    Thank you.

    This is helpful, but how do you get both devices to communicate to this single calendar via the iCloud?...
    You did not mention that it must be through iCloud.  But then, it can't really do so if you want to maintain separate Apple IDs.
    So you just set up an additional calendar on your devices.
    iPads, iPhone, Macs can show multiple calendars simultaneously.  I have my work calendar and several personal calendars all showing simultaneously on my iPad, Mac Mini and Macbook Pro.   In the case of my client, they didn't need multiple calendars.  They just were going to use the one shared calendar.  But I did setup the shared Google calendar and separate personal caldendars on their iPhones.  (e.g.: Husband's iPhone = husband's personal Mac Cal + shared Google Calendar.  Wife's iPhone = wife's personal Outlook for Windows Cal + shared Google Calendar.)

  • How can you get a compilation album to show up as one album rather than be split up but song and artist?

    how can you get a compilation album to show up as one album rather than be split up by song and artist? I've got loads of albums on iTunes that are compliations and they are all mixed up by track/ artist. Even when you click 'show album' it still just shows the album title and then the artist in alphabetical order - so the album is replicated several times
    Can anyone tell me how to amalgamate compliation albums please?

    This web page will help you: http://samsoft.org.uk/iTunes/grouping.asp

  • I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date is created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date  created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
    Regards
    TD

  • I have several pdfs on my iPad in iBooks. My iPhone shows only the categories, none of the documents. How can I get my iPhone to also show the documents that are on my iPad?

    I have several pdfs on my iPad in iBooks. My iPhone shows only the categories, none of the documents. How can I get my iPhone to also show the documents that are on my iPad?

    You will need to connect your iPad to your computer's iTunes and do File > Devices > Transfer Purchases to copy them over to your computer (that will copy PDFs and epubs that are in the iBooks app, not just actual ibooks), and you can then sync them to your iPhone. Or you might be able to open each PDF in iBooks on your iPad and use the share icon to email them to yourself and then use 'open in' in the Mail app on your iPhone to copy them to its iBooks app (if the PDF is protected then you may not get the email option via the share icon).
    The Settings > iBooks > Sync Collections setting doesn't copy items between devices, it just means that it a bookor PDF is on both devices and you move it into a collection on one device then it will be moved into the same collection on the other device

  • HT1386 i have noticed that the album artwork on itunes in my phone is missing when you open the "album" section of itunes installed on my phone. how can i get my album artwork to show up in the album section

    i have noticed that the album artwork on itunes installed on my phone is missing some of the album artwork when i go to the "album" section of itunes in my phone. How can i get the album artwork to show up

    first of all, no one is going to respond to this becuase limewire is used basically in your situation illegally. But let's say you import a cd, left click on the songs you imported and hit get album artwork, if nothing comes up, the album sn't in the itunes database, get it online. And I suggest never to mention limewire and music files on the same post here, since limewire is a file sharing program. Use Itunes, it's easier. theo

  • How can I get my Time Capsule to show up in finder?

    How can I get my Time Capsule to show up in finder?

    An alternate, and simpler method for most users is to open any Finder window, then look for the Time Capsule icon under the Shared heading on the left side of the window.
    When you click on the Time Capsule icon, a folder......named "Data", unless you have changed the name of the drive.....will appear to the right.
    Double-click "Data" to mount the Time Capsule drive on the desktop, where you can now drag/drop or copy/paste data to the drive.
    If the Time Capsule does not appear under the Shared heading when you open a Finder window......then you are likely using the Yosemite operating system on your Mac, and it will take some work to find it.
    In that case, Niel's method might be the better way to go.

  • How can I get iTunes 11 to stop showing iTunes Match songs on a computer for which iTunes Match is not enabled?

    How can I get iTunes 11 to stop showing iTunes Match songs on a computer for which iTunes Match is not enabled?

    Found it: PREFERENCES --> STORE --> uncheck "Show iTunes in the Cloud Purchases."

  • Verizon iphone. how can i get to the home screen without activating it on a plan

    how can i get to the home screen without activating it on a plan

    Unless it is a 3rd party cord, there is no cord that just goes from the phone to the wall. However, you will need a cord that connects to the computer and the phone. The device is in recovery mode and you will need to restore it. See this support document for the instructions. http://support.apple.com/kb/HT1808

  • I recently updated my itunes account with a new email how can i get my iphone 4s to show my new id

    I recently updated my itunes account with a new email how can i get my iphone 4s to show my new id

    Hi grecianbabe1,
    If you are having issues changing the Apple ID that is currently set on your iPhone, you may find the following article helpful:
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/ht1311
    Regards,
    - Brenden

  • How can I get the menu bar?pressing Alt button does not show it, right clicking in a space in the tab does not show customize button.

    I read the information on the help pages,but I can t get the menu bar to appear using the advice given.

    Right click the Home button.

  • How can I get new tabs to open showing my home page?

    When I open a new tab, it shows a blank page. How can I get it to open showing my home page?

    Install this extension to add that feature to Firefox. <br />
    https://addons.mozilla.org/en-US/firefox/addon/new-tab-homepage/

  • How can I get the tabs to stop showing the pages I just visited

    I don't want the sites/pages I visited to show up in thumbnails. How can I get this to stop?

    Hello mtroop24, you mean the thumbnails when you open a new tab ?
    see: [https://support.mozilla.org/en-US/kb/new-tab-page-show-hide-and-customize-top-sites#w_how-do-i-turn-the-new-tab-page-off How do I turn the new tab page off?]
    thank you

Maybe you are looking for