Apply CSS class to images in content block

Posted by Community Admin on 03-Aug-2018 18:57

Apply CSS class to images in content block

All Replies

Posted by Community Admin on 03-Apr-2012 00:00

Can someone point me to what happened to the apply css class option for images. It disappeared in 4.4 and now 5.0. Just being able to float an image left or right is pretty useless since the text just butts up against the image.
If it's gone for good what's the workaround because I need to let my clients manage their content and asking them to go into the html and inserting class="imgLeft" etc. will not going over well.

Posted by Community Admin on 04-Apr-2012 00:00

Dear KMac
This might be a starting point: http://www.sitefinity.com/devnet/forums/sitefinity/general-discussions/content-block-editor---wrap-text-around-images.aspx

You might also want to vote on PITS: http://www.telerik.com/support/pits.aspx#/public/sitefinity/9375

Markus

$(function()
  
    
  
       $('.content_t_m img').each(function()
  
            
  
                if ($(this).css('float') == "left")
  
                     
  
                       $(this).css('padding-right','18px')
  
                       $(this).css('padding-bottom','19px')
  
                      
  
        
  
           
  
                 if ($(this).css('float') == "right")
  
                     
  
                       $(this).css('padding-left','20px')
  
                       $(this).css('padding-bottom','21px')
  
                     
  
            
  
         )
  
          
  
    
  
  )

Posted by Community Admin on 10-Apr-2012 00:00

Thanks Markus,

I ended up just adding the ApplyCSS item to the radeditor and then added a photoLeft and photoRight class instead.

This thread is closed