1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Apply CSS class to images in content block

Apply CSS class to images in content block

3 posts, 0 answered
  1. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    03 Apr 2012
    Link to this post
    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.
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    04 Apr 2012
    Link to this post
    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')
      
                         }
      
                }
      
             )
      
              
      
        }
      
      )
  3. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    10 Apr 2012
    Link to this post
    Thanks Markus,

    I ended up just adding the ApplyCSS item to the radeditor and then added a photoLeft and photoRight class instead.
3 posts, 0 answered