Monthly Archives: October 2014

Nginx and Post Preview (Preview Changes) not working [DigitalOcean/Fix]

Recently I have been experiencing an issue with Preview Changes not working in WordPress on a Nginx VPS over at DigitalOcean. I use a few common config files from nginx-common-config. Before, the configuration did not fix the problem, but after it did. Thanks to the /VVV guys for a configuration that solved the problem.

To fix you can just clone down nginx-common-config and include the nginx.wp.conf file.

How to create a stroke around a number with CSS

I recently had to find out how to do this while working on a site a couple weeks ago and thought I’d share. So, what we’re making is this.

Screen Shot 2014-10-26 at 9.25.07 PM

HTML

https://gist.github.com/anonymous/f92fdf33d279c725f435

From the above HTML you can see we first create three layers:

  1. a background (black solid background with rounded corners)
  2. a stroke (a white circle)
  3. another inner-circle with a number in it (black circle inside of the white one

CSS

https://gist.github.com/anonymous/45ad0a806120d297f5db

There are essentially three layers here. The background is an obvious one. The stroke is a white background <div> that is made into a circle with border-radius and some padding. This allows us to fit the inner circle (also a <div> made into a circle)  into the previous white circle which creates the illusion of a stroke with some padding. So, black square, white circle (with padding), black circle.

You can fiddle with this.