• 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
  • WordPress Plugin: Author Spotlight

    WordPress Plugin: Author Spotlight

    Reading time: 2 minutes

    I’ve been doing a lot of looking into using WordPress as a multi-author website/blog lately.  A few of my clients have requested the need to handle (elegantly) multiple authors, so (being fresh on my mind) I feel inclined to share. One of the coolest plugin combinations I’ve come across recently is using Author Spotlight and…

    Tutorial, WordPress
  • BlogInfo – One Tag with a Whole Lot of Awesomeness

    BlogInfo – One Tag with a Whole Lot of Awesomeness

    Reading time: 1 minute

    One of the most versitile tags in my arsenal that WordPress gives me is a fun little tag called <?php bloginfo(); ?>.  By itself, it’s not much fun, but when you add in a variable, it can tell you anything you need to know about your blog.  Like what, you ask? name description admin_email url…

    WordPress