Surprise Me!

Style Widgets Using CSS3 Gradients and Background Images with the Thesis Widget Styles Plugin

2011-11-02 0 98 Vimeo

http://www.thesistoolbox.com Let’s look at styling the widget area now where we’ll style the heading and the body separately. Begin at the widget style’s customization options (video 1 has introductory instructions on using this plugin) in the Thesis Widget Styles plugin. Leave the widget background alone but we’ll customize the heading font and heading background. And for this example we’ll use a background gradient. The heading padding and border will be customized along with the widget body padding and widget body margin so we can separate the text from the header. We’ll use a background image to customize the body background. Style Heading Font and Gradient Background In the Thesis Widget Styles Plugin, go to the heading font style. Change the heading font to 24 pixels and pick Molengo one of the Google fonts. Select normal spacing, get rid of all caps and center the heading text. For the background gradient go to colorzilla.com and use the Gradient Editor to configure the gradient code. We have one set up here. It’s actually quite simple. I picked a dark red color as the base and then a lighter version of that for the edges. And all I did was just move up directly above the other color to pick a lighter version of that same color and then I created these two stops. You can create a stop simply by pressing a button. I created these two stops, made the two edges lighter and then went to dark. And what I’m aiming for is a very slight variegation of color from light to dark. I have this whole group of text that I have to copy. Then I’ll come back over here and paste that gradient text right there. In the padding we’ll give ourselves 10 pixels all the way around. Select the save button in the Thesis Widget Styles plugin. Remember, this is style 2 we are working on. Go to our widgets here and we are working in widget block 2. I’ll take column 2 here and select style 2 to apply to it. Save it. Come back over and refresh this. Review Changes to Heading Font and Gradient Background Now we have our variegated red that goes from light to dark in here in a way that gives it a sense of depth. I don’t love that text so we’ll go back to the heading font style and change it to Droid Serif which I like better. So now we’ve got a heading that’s cool looking. Style Widget Body with a Background Image Next we’ll style the body with a background image. A few weeks ago, I introduced you to the Subtle Patterns site which has many very subtle patterns that you can download for free. In fact, Thesistoolbox.com uses one of their patterns for the body background. I like this fabric pattern here. I’ve already downloaded it but you can just hit download and then upload it to your Media Library or even better into your custom folder. For the time being it’s been uploaded to my Media Library. I’ll go to the library, select edit and copy the URL. Then go back to the Thesis Widget Styles plugin to our style and then to the Body Background Image. Paste that image URL. We want to repeat it in both the x and the y directions. It doesn’t really matter where it starts since it’s starting in the x and y direction. Go to Body Padding and put in 20 pixels around this. And then add 10 pixels on top for our Body Margins and hit save. Review Changes to Widget Background Image Go back to the page and refresh it. Now we have this paper background, 20 pixels of padding all the way around the text, 10 pixels of margin in between the two. Next we’ll add a border around this paper. Return to the Thesis Widget Styles plugin to our style customization options, select customize body border and hit save. Then go to our border style and make it 1 pixel with a solid light grey color. Go back to the page and refresh it. The border gives it a bit of definition because the variegation of the paper no longer continues to the perimeter but stops right there. We could also give it a very slight drop shadow to give it a little bit of depth. Return to the Thesis Widget Styles plugin to our style and give it 2 and 2 and make it slightly darker. Hit save, refresh it. Now we’ve come up with a very attractive widget style that can be used over and over again. The widget stands out nicely. It’s easy to read and it doesn’t look like a default Thesis widget.

Buy Now on CodeCanyon