html - how to select a class which is children of many elements -


<div class="rightsidebox">     <div class="item-info-list">         <p>model: aidcu</p>         <div class="product-details">             <p></p>             <div class="price-box"> <span class="regular-price" id="product-price-1617-related">       <span class="price">$8.99</span></span>             </div>             <p></p>         </div>     </div> 

i want make style price , make color green in case in rightbox div , want use css , cannot change structure because theme , should not have conflict other prices in other themes

i can use div.rightsidebox>div.item-info-list

but cannot go further because of paragraph in there how can solve it? have weakness in using ">" , multiple classes in each other

.rightsidebox .price { color: green !important; } // important override other styles 

edit: usage of > - selectorr

the element>element selector used select elements specific parent. note: elements not directly child of specified parent, not selected. more info


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -