Tuesday, January 28, 2014

Pseudo element selector ::first-letter not working on Mozilla Firefox.

I have a css and html markup below using ::first-letter selector. The markup below works in Google Chrome and Internet Explorer which changes the font size, weight and color properties of the first letter but not on Mozilla Firefox.
  .fourthwrapper::first-letter   
  {  
       font-size: 200%;   
       font-weight: bold;  
       color:brown;  
  }  
 <div class="fourthwrapper">  
      <p>  
       This is some text within a div with a class of wrapper.   
      </p>  
  </div>  
The solution would be to change the css code to specify that the first letter of the paragraph should be modified.
 .fourthwrapper p::first-letter   
     {  
       font-size: 200%;   
       font-weight: bold;  
       color:brown;  
     }  

0 comments:

Post a Comment