Widget Background Image

Modern, responsive, unique and elegant one-page WordPress theme to showcase your creativity
GK User
Fri Jul 12, 2013 6:25 am
Hello - Is there any easy way to set a custom background image for a widget area?
User avatar
Fresh Boarder

GK User
Fri Jul 12, 2013 8:28 am
With use of css - yes.
Show me your site and point which widget background You would like to change.
User avatar
Moderator

GK User
Fri Jul 12, 2013 7:49 pm
Cyberek - thanks. Im doing my development local, so I don't have it live.

I am using a text widget in the "Bottom I Widgets" section. I assume I would just need to add a class and under Widget Style enter it into "Custom CSS Class"?

If that is correct, could you tell me which CSS file I would need to modify?
User avatar
Fresh Boarder

GK User
Fri Jul 12, 2013 7:57 pm
I should add I only want this to apply to this specific text widget (if that is possible?), not the entire Bottom I Widgets section.
User avatar
Fresh Boarder

GK User
Mon Jul 15, 2013 10:06 am
Withous online access I cant give You exact css rule, but by inspecting html code You will find, that each module has unique id:
Code: Select all
<div id="text-27" class="box  mediumspaces all widget_text col6 nth2 last4">

This is one of standard modules in this template.

To change background on it You should add this css to: wp-content/themes/Creativity/css/override.css
Code: Select all
#text-27 {background: #ff0000}

to make background red or:
Code: Select all
#text-27 {background: transparent url('../images/backgroundimagename.jpg') 50% 0 no-repeat}

to create background from image, placed in /wp-content/themes.Creativity/images with name backgroundimagename.jpg centered horizontally aligned to top of the module.

Remember to enable "Use the override.css file" in theme settings (item in admin menu, under comments section, advanced tab).
User avatar
Moderator


cron