Responsive theme, Changing Home Widget Background Colour
  • Hi, How can i change the background color of the home widgets, Different color for each (i.e, red for Home Widget 1, Blue for Home Widget 2, Yellow for Home Widget 3)

    Regards
    Arun
  • Hi Arun,

    This should be easy:

    The general background for all widgets is:

    (example only)
    .widget-wrapper {
        background:white;
    }
    

    to "target" homepage and nothing else:
    .home .widget-wrapper {
        background:white;
    }
    

    now if you wish to change and have different colors to all three widgets in homepage area you would need to add a widgets from Appearance > Widgets and after that go back to your site, hit refresh and view the source for WordPress generated IDs (each widget will have unique ID's) and use that to style them.

    For example this is what I would get when viewing the source code:

    XQiub.png
    .widget-wrapper #text-13 {
        background:red;
    }
    

    and that will change the background color only for first widget in my homepage. And .home in front is no longer needed.

    Now there's also one more "trick" you can also change the colors and styles for titles as well:
    .widget-title-one{}
    .widget-title-two{}
    .widget-title-three{}
    

    Hope that this helps,
    Emil
    arunbandhu wrote:
    Hi, How can i change the background color of the home widgets, Different color for each (i.e, red for Home Widget 1, Blue for Home Widget 2, Yellow for Home Widget 3)

    Regards
    Arun
  • Thanks Emil, i tried the instructions. I am able to do the change of color of all the widgets in home page. But when i try the widget id method to assign color to each widget, its is not working. No color change can be noticed when i browse the page. I tried the following code ( i am using advanced recent posts in the widget space) .
    .widget-wrapper #advanced-recent-posts-2 {
        background:red;
    }
    

    Please help. I really want to assign each widget space a different colour for the home page
  • Could you share your website link?


    Ulrich
  • try other way around:
    #advanced-recent-posts-2 .widget-wrapper {
        background:red;
    }
    

    Emil
    grappler wrote:
    Could you share your website link?


    Ulrich
  • Tried it other way , still not working...please help . www.chennaidost.com
  • arunbandhu wrote:
    Tried it other way , still not working...please help . www.chennaidost.com
  • My wild guess is because this is a plugin, so you can apply background without .widget-wrapper, just keep this plugins class or ID.

    Emil

    arunbandhu wrote:
    Tried it other way , still not working...please help . www.chennaidost.com
  • Thanks, assigning css to only the plugin class works
    #advanced-recent-posts-2
    {
        background:red;
    }
    
  • Very nice!

    Please rate the Theme at: http://wordpress.org/extend/themes/responsive

    Emil
    arunbandhu wrote:
    Thanks, assigning css to only the plugin class works
    #advanced-recent-posts-2
    {
        background:red;
    }
    
  • hi I would like to do the same on my website - hamiltonresourcing.com but for the main widgets. I just want white background at the moment its light gray. However i have not programming or development experience. Could you please provide step by step instructions. Thank you.


    Very nice!

    Please rate the Theme at: http://wordpress.org/extend/themes/responsive

    Emil
    arunbandhu wrote:
    Thanks, assigning css to only the plugin class works
    #advanced-recent-posts-2
    {
        background:red;
    }
    

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

    Most Popular This Week