CALL 425.830.8350 FOR CUSTOM WORDPRESS DESIGNS

In a quest to use something different for my sidebar titles I started looking at some of the options for creating those cool looking 3D style ribbons where the edges fold neatly on the outside of the container holding the text. There’s a bazillion examples of this and most of the tutorials I saw were leaning toward CSS3 to do all the work.The problem is… CSS3 just ain’t quite ready for prime-time since it’s not fully supported across all browsers and would consequently require even more code to make it work like it’s supposed to. So, I took the simple way out and instead of using the radius selectors that CSS3 provides (which aren’t supported in most versions of IE, if any) I created a three image method of creating the sidebar boxes.

So, the three images consist of:

  1. the top including the ribbon
  2. the repeatable middle section
  3. the bottom

These were all created in Photoshop as one image then sliced against a transparent background and saved in PNG format. Pretty simple stuff.

Then it was time to create the container and divs that would hold the info. We’ll start with just the container div:



Now, you can adjust everything to your dimensions but my sidebar is a little skinny and the main container div had to allow for some margins so it didn’t hit the left and right borders. The margin-bottom is there so I can stack the boxes on top of each other and there will be some space in between them. Now we do the 3 inner divs that hold the images:


And, last but not least, the HTML

 


Notice I also gave some formatting to the H2 title so it would display in the right location and look good against the color of the ribbon background.

The end result would produce a box like so:

The three pieces are as so (right click, Save As if you wish to use them:

Download the Photoshop CS4 .PSD files!

Click Here To Download

By using repeat-y on the middle section it will automatically repeat downward as the content increases or decreases. Using this 3 image method cut out the need to have literally dozens of CSS3 statements and used about half the code to get the same effect. Going this route assured me that the look would be the same across browsers. As much as i’d like to be a ‘purist’ and try to do everything with strict code and no images, the world just isn’t quite ready for it.

Pin It on Pinterest

Share This