<div class="mydivclasss" id="mydivid"> <span class="myspanclass"> My Text </span> </div> Code (markup): i have the html generated by my cms as above,. i want to make the "My Text" appear in bold,. when ever it appears in the mentioned span class and in the mentioned div only if the same occurs in the same span class of a different div id it shud not be boleded what should be the thing that i need to add to my css file to make it ? Thanks in advance
Unless you want all the text in mydivid bold (even text outside the myspanclass span) you should also include the span class like so: #mydivid span.myspanclass {font-weight:bold;} Code (markup):