Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 Hi again, Im sure this one is simple but it's just not working. I have a menu and when i hover over a tab its light blue background. When i get to that page i would like it to stay that color on that tab. I have this code in my style sheet li.current { background-color: #AED3D9; color: #FF0000; } and then i have class="current" in my menu Home About Us Services/Staff Online Coupons Dry Cleaning Articles FAQ Contact Us thanks in advance Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted April 24, 2009 Report Share Posted April 24, 2009 Can you post a link, please, so we can see the balance of the page and css. There may be something else interfering with the code someplace. A link works best for us to check the full page. Saves us having to download or create a page. Quote Link to comment Share on other sites More sharing options...
Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 (edited) Here is the link www.webdrycleaners.com/webdrycleanersarticles.html Edited April 24, 2009 by Cashster09 Quote Link to comment Share on other sites More sharing options...
Andrea Posted April 24, 2009 Report Share Posted April 24, 2009 change the CSS to .current a { background-color: #AED3D9; color: #FF0000; } but aside from that, you have all kinds of coding errors, beginning with using HTML doctype and XHTML closing tags. Quote Link to comment Share on other sites More sharing options...
Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 (edited) yes i noticed the doctype on the article page i should change that... which doctype should i use? I also changed it to a background instead of the blue color and it works great, but i want the text color to be black not white. I changed it in the styles.css but its still white. here is my code. .current a { background: #AED3D9 url( selectedMenu.jpg?z=16168 ) repeat-x; color: #000000; } Edited April 24, 2009 by Cashster09 Quote Link to comment Share on other sites More sharing options...
virtual Posted April 24, 2009 Report Share Posted April 24, 2009 (edited) In your CSS you should put #nav1 li a.current { background: #AED3D9 url( selectedMenu.jpg?z=16168 ) repeat-x; color: #000000; } and in your html page Dry Cleaning Articles Edited April 24, 2009 by virtual Quote Link to comment Share on other sites More sharing options...
Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 thank you, that worked perfectly! I was putting in the wrong place in the tag instead of the tag.... Quote Link to comment Share on other sites More sharing options...
virtual Posted April 24, 2009 Report Share Posted April 24, 2009 Glad to help out Quote Link to comment Share on other sites More sharing options...
Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 (edited) Is a list intentionally different where you need to put the "class" tag? Usually i can put .whatever { color: somecolor; } and it would work, but for the list navigation it didnt.....but when i placed it in the tag it was perfect like you said... thanks Edited April 24, 2009 by Cashster09 Quote Link to comment Share on other sites More sharing options...
virtual Posted April 24, 2009 Report Share Posted April 24, 2009 (edited) The class tag needs to be on the tag because that is the state which is changing colour, not the tag. Edited April 24, 2009 by virtual Quote Link to comment Share on other sites More sharing options...
Guest Cashster09 Posted April 24, 2009 Report Share Posted April 24, 2009 awesome, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.