I need CSS Help Today?
-
I have vertical menu in a table where each menu link is in a new row/cell. The background image on the cell changes when I hover over the link, that works fine. But now I need to make the background image on the cell/link corresponding to the current page to be the same as the hover background image. So if the user hovers on the HOME link the background image will change from tan to green, then when they click the HOME link they will be taken to the HOME page but the background image returns to Tan, and I want it to stay Green as long as they are on that page. How do I do that with CSS? I tried using .menu-class a:active, but thats just active during the half second click. Here is the css I am using right now, any help is appreciated. .menu-td { font-family: "Trebuchet MS", Helvetica, sans-serif; height: 29px; font-size: 14px; width: 201px; } .menu-td a { background-image: url(../images-grn/menu-arrow.gif); background-repeat: no-repeat; background-position: 5px center; text-decoration: underline; height: 100%; width: 100%; display: block; padding-left: 15px; padding-top:3px; } .menu-td a:hover{ background-repeat: no-repeat; background-position: left top; text-decoration: none; height: 100%; width: 100%; display: block; background-image: url(../images-grn/menu-over.jpg); } .menu-td a:active { background-repeat: no-repeat; background-position: left top; text-decoration: none; height: 100%; width: 100%; display: block; background-image: url(../images-grn/menu-over.jpg); } Thanks, MJ
-
Answer:
You may contact a CSS expert live at website like definitivelab.com ,etc .
mjeffers... at Yahoo! Answers Visit the source
Other answers
This is a cop-out I guess, but it is so much easier to do that kind of thing with JavaScript. You know, if you think of HTML as the 'stuff', CSS as the 'look' and JavaScript as the 'verb' when approaching website design then you don't end up with having to force a tool to do what it doesn't want. I do remember looking for a way to do something like that before with CSS, but can't find those pages again. Why not just do it with JavaScript.
build your menu using XML.and then you could display the xml file by giving an order in your CSS
Related Q & A:
- I need desperate help.Best solution by Yahoo! Answers
- I need Ebay help.Best solution by Yahoo! Answers
- I need some help about yahoo answers.Best solution by Yahoo! Answers
- I need major help with iTunes.Best solution by Yahoo! Answers
- I need slight help with filling out the FAFSA.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.