CSS Shorthand for all but the last item

  • Targeting a child element is easy: :last-of-type
  • Targeting all but one element is pretty easy, too: :not
  • Chain those together and what do you get? One line of code and less markup in your html!

There...

Read More

Creating GitHub Subtasks in Issues

I just found my favorite to-do list organization. It’s inside of GitHub issues and can also be used as a subtask. It’s so perfect. So elegant. And so, so simple.

Here’s what you do…

  1. Open a GitHub issue
  2. ...
Read More

Superscript Tag <sup> and Line Height

Using <sup> is really useful when you’re dealing with trademarks. Most of the time, you probably won’t run into any issues, and the default styles will work perfectly for you. Unless you are using the superscript tag in a title...

Read More

Responsive Image Cropping with CSS

Create a responsive promo banner with a fixed height. Image needs to horizontally crop as the browser width changes.

Requirements

  • Promo banner should stretch the width of the browser (to the max-width of the website)
  • Left div should...
Read More

Landing pages for categories using Archives

Here is an option for people who are okay with using “categories” as your filing system. You will ONLY be able to use this option if you use ONE category per post. If you’re cool with that, and using tags...

Read More

Installing WordPress Plugins Locally

If you are working on your WordPress locally, before uploading it for the world to see, thank you. If you are new to this, there are a few changes you will need to make in order to get everything working...

Read More

Adding category classes to body tag

Trying to add category classes was a bit tedious. I ran across a few blog posts on how to implement them. Many didn’t work (maybe they were for previous versions of WordPress?), but one did.

What worked

add_filter('body_class','add_category_to_single');...
      
Read More