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

Forums / Designing & Styling / Backgrounds colour in content blocks

Backgrounds colour in content blocks

9 posts, 0 answered
  1. Ashley
    Ashley avatar
    6 posts
    Registered:
    10 May 2011
    30 Sep 2011
    Link to this post
    Hi,

    This might be a simple fix, but I wondering if there is a simple way to change the background colour of individual content blocks.

    There are some content blocks on certain pages of my site i'd like to add grey shading to the background of.

    The only thing that comes close in the editor of the content block is the button which says background colour, but in effect all it does is highlight the text, rather than applying the colour to the whole content block.

    Thanks for any insight or help.

    Ashley
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    30 Sep 2011
    Link to this post
    Hi Ashley,

    Thank you for your question.

    The best approach is to use the css class of the content block, you'd like to apply background color to. You can find it in Advanced options in the editing panel of your content block. The name of the class by default is sfContentBlock, but you are allowed to modify it. After you have the css class, simply  include this sample to a css widget on your page:
    .sfContentBlock
    {
         background-color#6D7B8D;
    }

    If you have several content blocks on your page, make sure to give them different class names and add similar code for each of them in your css widget.

    Let me know if you have any additional questions.

    Regards,
    Zheyna Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Sonia
    Sonia avatar
    2 posts
    Registered:
    14 Oct 2013
    14 Oct 2013 in reply to Jen Peleva
    Link to this post
    Hi there.

    I have been having the same problem and have tried the advice which was given.
    I want to change  the background colour of the content block.

    I have gone into advanced options in css class the following comes up:-
    tile-content box_grey square-tile
     
    The background of the content box is grey and I am trying to change the background colour.  I have typed in a different colour but it does not allow me to.

    Could you help me with this please.

    Kind regards

    Sonia

  4. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    14 Oct 2013
    Link to this post
    Hi Sonia,

    The classes "-tile-content box_grey square-tile", which are entered in the CssClass property of the content block you want to change, are probably created by the front-end developers of your website and they add css to the content block. Since I can't tell exactly which class does what, I assume from the name that box_grey is responsible for the grey background of your content block. You can try to remove it and add your own custom class. Then use the custom class to declare different background color. For example if your custom class is Red_Block you can drop a css widget on the page and declare the following in it:
    .Red_Block
    {
    background-color:red;
    }
    This should set a red background to the content block. For more information about css classes please refer to the W3C documentation:

    http://www.w3schools.com/css/css_id_class.asp

    Regards,
    Jen Peleva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Sonia
    Sonia avatar
    2 posts
    Registered:
    14 Oct 2013
    17 Oct 2013 in reply to Jen Peleva
    Link to this post
    Hi Jen,

    Thanks for getting back to me.

    I have tried to delete it and add another colour this doesn't seem to work.

    Can you please give me step to step guide with a screen shot please.  This is becoming very time consuming for me and causing long delays in creating pages to my site.

    Also can you please explain how to creat a tile widget.

    This is not found on the contents tab.  It should be as it gets used alot in my website, please can you send me screen shots of how this is done.

    This will save a lot of my time.

    Thanks,

    Kind regards

    Sonia
  6. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    18 Oct 2013
    Link to this post
    Hi Sonia,

     As my colleague Jen explained, the class you have set for your content blocks is custom made and we cannot attempt to modify what we do not see or what we do not know how its made. In this video I have recorded my steps in modifying a single block of content.

    As far as the tile widget - you need to specify your criteria for it. I would recommend to open a support ticket where we can help you solve the problem faster.

    Regards,
    Ivan D. Dimitrov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Jack
    Jack avatar
    6 posts
    Registered:
    04 Feb 2015
    14 Apr 2015
    Link to this post

    I am using Sitefinity 8.0, created a template from scratch dropped an image and content block on the template.  No theme is selected.  Opened the advanced edit on both widgets, changed the background color to #8F0000.

    There are no color changes.  This is Sitefinity 8.0, no other pages.  Just a basic setup.

     Thanks

  8. Junior Dominguez
    Junior Dominguez avatar
    115 posts
    Registered:
    07 Dec 2016
    17 Apr 2015
    Link to this post
    Hi Jack,

    Unfortunately I was not able to reproduce that problem in a Sitefinity 8.0 project. Can you please provide a short video showing the steps you followed and the problem itself?

    Best Regards,
    Junior Dominguez
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  9. Kierstin
    Kierstin avatar
    7 posts
    Registered:
    19 Nov 2015
    19 Oct
    Link to this post
    I am trying to do the same thing in 9.1, and I cannot get my background color to change. 
9 posts, 0 answered