Highlight current page

Hello experts.
I need help to highlight the current page in my testmenu.There is a  mlddm > li > a:hover   class that i want to use for li item with class search.I have the body id="search"  but it is not working.
Any help?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />
<title>Untitled Document</title>
<style type="text/css">
body{margin:0;padding:0;}
.divmlddm { /* for IE7/Win */
	background: url(menu/bg.jpg);height:39px;
	margin-left:8px;
	margin-right:8px;
	width:939px;
}
.mlddm
{	margin: 0;
	padding: 0;height:39px;}
.mlddm li{	
    display: inline;
	list-style: none;
	margin: 0;
	padding: 0;
	float: left;white-space: nowrap;
	font: bold 14px arial, sans-serif}
.mlddm li a{
	display: block;
	text-align: center;
	color: #ffffff;
	margin: 0;
	width: auto;
	text-decoration: none;
	white-space: nowrap;
	padding-top: 12px;
	padding-right: 14px;
	padding-bottom: 12px;
	padding-left: 20px;
}

.mlddm > li > a:hover{
    color: #ffffff; background-image:url(mypath/menu/bghover.jpg); background-repeat:repeat-x;
	}
#search .mlddm > li > search a{
    color: #ffffff; background-image:url(mypath/menu/bghover.jpg); background-repeat:repeat-x;
	}
</style>
</head>

<body id="search">
<div class="divmlddm">
      <ul class="mlddm"  id="mlddm" params="0,0,500,fade,200,h" >
       <li><a href="#">TESTTEST</a></li>
 
       <li class="search"><a href="#">TESTTEST</a></li>
       <li class="NOSEPARATOR" id="contact"><a href="#">TESTTEST</a></li>
      </ul>
    <div style="clear:both;"></div>
    </div>

</body>
</html>

Open in new window

LVL 2
PanosAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daemon_ByteCommented:
Should it not be

.mlddm li a:hover
and
#search .mlddm li.search a
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PanosAuthor Commented:
This is working.
Thank you
0
LZ1Commented:
Actually, try this:
#search .mlddm > li > .search a{  
    color: #ffffff; background-image:url(mypath/menu/bghover.jpg); background-repeat:repeat-x;  
        }  
You needed to specify the class of search right before the anchor tag.
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />  
<title>Untitled Document</title>  
<style type="text/css">  
body{margin:0;padding:0;}  
.divmlddm { /* for IE7/Win */  
        background: url(menu/bg.jpg);height:39px;  
        margin-left:8px;  
        margin-right:8px;  
        width:939px;  
}  
.mlddm  
{       margin: 0;  
        padding: 0;height:39px;}  
.mlddm li{        
    display: inline;  
        list-style: none;  
        margin: 0;  
        padding: 0;  
        float: left;white-space: nowrap;  
        font: bold 14px arial, sans-serif}  
.mlddm li a{  
        display: block;  
        text-align: center;  
        color: #ffffff;  
        margin: 0;  
        width: auto;  
        text-decoration: none;  
        white-space: nowrap;  
        padding-top: 12px;  
        padding-right: 14px;  
        padding-bottom: 12px;  
        padding-left: 20px;  
}  
  
.mlddm > li > a:hover{  
    color: #ffffff; background-image:url(mypath/menu/bghover.jpg); background-repeat:repeat-x;  
        }  
#search .mlddm > li > .search a{  
    color: #ffffff; background-image:url(mypath/menu/bghover.jpg); background-repeat:repeat-x;  
        }  
</style>  
</head>  
  
<body id="search">  
<div class="divmlddm">  
      <ul class="mlddm"  id="mlddm" params="0,0,500,fade,200,h" >  
       <li><a href="#">TESTTEST</a></li>  
   
       <li class="search"><a href="#">TESTTEST</a></li>  
       <li class="NOSEPARATOR" id="contact"><a href="#">TESTTEST</a></li>  
      </ul>  
    <div style="clear:both;"></div>  
    </div>  
  
</body>  
</html>

Open in new window

0
PanosAuthor Commented:
Thank you
regards
panos
0
PanosAuthor Commented:
LZ1.
I did not see your post but i have test this and it is not working
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.