Simply add “text-indent -9999px” as a property for your anchor element and the text will be pulled of the left side of the page but still visible for screen readers. As for the scrollbar take your pick, there are quite a few plugins for custom scrollbars.
I thought I could use the same method as the top nav. See the code;
#nav li em {left:0 top:0;}
On menu/leftsidebar nav (nav in question) it works fine (text is under sprite) on the non-active pages even on the hover. It’s just the active page that it’s not working.
Because you have multiple elements that change based on where you are within the site it would be easier to just add the text-indent property to the LI selector as it will remove the text no matter what element it exists within.
Hi Karen,
I would not use text-indent to hide the text. By doing that users with “Images Off” loose the ability to navigate since there is no visible replacement text.
The empty element for the sprite image is what I normally call the sandbag. It gets set as position:absolute; and when comes after your text it naturally layers above it since it is a positioned element lower in the source order.
I also remember Paul writing a detailed example for you in one of your older threads, have a look through it as well since it gives a better explanation of how to structure the html/css. http://www.pmob.co.uk/temp/sculleynav.htm
EDIT:
Keep in mind that you can reduce the amount of BG positions by setting a negative margin on the sandbag for hover/focus. The first link I gave uses that method.
I use Paul’s examples for my sprites so I’ve gone over it quite a bit. I don’t get why it works on the top nav but not the bottom. I’ll look yours over.
Great call! Now it’s working w/o the text-indent. Thanks so much!
I’d like to make the top and bottom blue tabs with very small text in them deeper so that when users make text size bigger the text dictates the height so it doesn’t break the layout. Tried setting a min-height but didn’t seem to work. Thanks much!