First time using CSS so my question may not make sense. I am using a menu template that uses javascript to slide CSS items around. I have multiple items next to each other and I wanted to alternate the background by making a subclass for the item(eg: .cc_item .odd{ background:#fff}).
style:
.cc_item{
text-align:center;
width:140px;
height:600px;
float:left;
border-bottom:1px solid #000;
background:#e8c486 url(../images/menuBack.jpg) repeat top left;
position:relative;
-moz-box-shadow:3px -3px 10px #000;
-webkit-box-shadow:3px -3px 10px #000;
box-shadow:3px -3px 10px #000;
}
html:
<div class="cc_item" style="z-index:6;">
<img src="images/1.jpg" alt="image" />
<span class="cc_title">Pizza</span>
<div class="cc_submenu">
<ul>
<li class="cc_content_1">Pizzas</li>
<li class="cc_content_2">Calzones</li>
</ul>
</div>
</div>
I want to add a .odd{ } to the cc_item so in the html I can specify the "odd" cc_item class. I've tried a couple things, but can't seem to get it to work.
- I don't know the proper way to add a subclass to a css item. I've done it with my table stylesheet, but the "." in front of the cc_item is throwing me off(sorry...really new).
- I don't know where to specify the "class=odd" in the html.
- I don't know if I make these changes the javascript that uses cc_item will be affected.
Thanks.