• Home
  • About Mitch
  • Speaking
  • Articles
  • Contact
  • Home
  • About Mitch
  • Speaking
  • Articles
  • Contact

Digital Strategist

WordPress Developer

Content Creator

Unapologetic Punk

Mitch Canter

  • X
  • Bluesky
  • GitHub
  • Twitch
  • YouTube
  • LinkedIn
WordPress

50 Days to a Better WordPress Blog–Day 4: Caption Styles

CMDR Mitchcraft

Reading time: 2 minutes

This post is the fourth of an ongoing series entitled “50 Days to a Better WordPress Blog”.  During this time, Mitch will be providing small snippits of code, plugins, and things you can do to make your blog more attractive, attain new readers, and keep old ones coming back time and time again. You can see the entire series here.

If you’re like me you love to look at all of the “little details” in a theme.  Sometimes, it’s the littlest detail that makes the biggest difference, and when it comes to inserting images, that little detail lies in the “caption” elements of the site.

When you insert a picture, you have the option in the image uploader of adding a “caption”.  Most of the time, it drops a little blurb of text under the image and that’s that.  But I’m going to give you two really nice styles you can add to give your captions (and images) a little pop.

The Standard Caption

First thing’s first – the class we’ll be working with in the CSS is “.wp-caption”.  This controls the caption box as a whole.

I've always wanted to use this photo...
I've always wanted to use this photo…

A standard caption typically looks like this:

.wp-caption{
background-color: #ccc;
padding: 20px;
text-align:center;
font-size: 11px;
}

Nothing too complicated here, but some small styling goes a long way.  We’ve given it a background color, padding, and aligned the text (as well as making it smaller so it stands out).

Polaroid Captions

But we can have fun with this – Let’s turn our images into polaroid photos:

.wp-caption{
background-color: #FFF;
padding: 20px 20px 30px 20px;
text-align: center;
font-size: 11px;
}

.wp-caption img{
margin-bottom: 10px;
}

You may have to adjust the CSS a bit, but that essentially drops in the bottom spacing needed to make it look more rustic and vintage.  If you want to REALLY get funky, you can throw in some CSS3 and give it a drop-shadow:

-moz-box-shadow: 0px 0px 6px #666;
-webkit-box-shadow: 0px 0px 6px #666;
box-shadow: 0px 0px 6px #666;

666, ccc, FFF
  • Twitch Conditional – A WordPress Plugin for Twitch Streamers

    Twitch Conditional – A WordPress Plugin for Twitch Streamers

    Reading time: 2 minutes

    I love Twitch. I actually spend my work day with one browser dedicated to Twitch, and subscribe to MrHappy’s daily Stream. So when rumors surfaced a few years ago their API, of course I wanted a way to interface with that API. In doing research, I realized that a lot of streamers don’t have real…

    WordPress
  • iPhone Theme for WordPress

    iPhone Theme for WordPress

    Reading time: 1 minute

    Now that everyone and their mother has gone out and bought a shiny new iPhone (yesterday was the 3G iPhone’s release date, after all), it’s time you made your WordPress theme a bit more iPhone friendly.

    WordPress