CSS: make all whatever text in a div to be bold

Discussion in 'CSS' started by digitanay, Mar 30, 2010.

  1. #1
    <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
     
    digitanay, Mar 30, 2010 IP
  2. sylverCode

    sylverCode Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    #mydivid {font-weight:bold;}
    Code (markup):
     
    sylverCode, Mar 30, 2010 IP
  3. Kirkbride

    Kirkbride Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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):
     
    Kirkbride, Mar 30, 2010 IP