I have a site which is created dynamically and each page has a menu at the top of the page. The menu is a container div which contains a div for each menu item. The container has a background image which I want to change depending on which menu item is selected.
This code puts one of the background images into the container and works ok. (This is set up for the home page)
Is there a way of combining this data with an inline style in order to change the background image only, but leaving the other attributes active?
Once the div is declared, can I change an attribute within it?
Keith
This code puts one of the background images into the container and works ok. (This is set up for the home page)
Code:
.menu {
width:980px;
height:40px;
font-size:12px;
color: #56789a;
font-family: Verdana, sans-serif;
text-decoration: none;
font-weight:normal;
text-align: left;
background-image: url("menu/men_home.jpg");
}
.menu a {
font-size:12px;
font-family: Verdana, sans-serif;
text-decoration: none;
font-weight:normal;
color: #56789a;
}
.menu a:hover {
font-size:12px;
color: #FF0000;
font-family: Verdana, sans-serif;
font-weight:normal;
text-decoration: none;
}
Once the div is declared, can I change an attribute within it?
Keith