A Nifty CSS Trick

This is so obvious that I hesitate even to mention it, but it hadn’t occurred to me before yesterday, and on the off-chance it hasn’t occurred to you, dear reader, I have decided to post it. If you don’t have a Tumbl of your own, you can stop reading…

…now!

The Problem

In addition to its canonical location on my website, this blog can be read in several other places, RSS readers, the Tumblr dashboard, in emails. This is fine. This is good. But several of the things that you get in the PREMIUM WYWG experience on my site won’t show up in these other places. Animated GIFs don’t work on the Tumblr dashboard, some email clients or RSS readers might strip out images, and you can’t get jazzy stars ANYWHERE other than on my site.

Oftentimes this doesn’t really affect anything, but occasionally essential meaning is lost due to jazzy-star-deficiency, and these times, the obvious solution is to add a little note mentioning that for the FULL, SEXY, WYWG goodness, readers should visit my actual website.

But then keen followers of WYWG that always read on the website get pestered by all these meaningless, confusing instructions to visit the site they are actually already currently looking at. No good.

The Solution

Then it came to me in a flash. Add this to your Tumblr theme or custom CSS:

.offsite
{
  display: none;
}

And then mark up your exhortations to go visit your actual site with the offsite class, thusly:

<p class="offsite">
  Go visit <a href="http://tumblr.whileyouweregone.co.uk">my site</a>!
  The grass is greener there!
</p>

Now, these messages will appear on the dashboard, in RSS, etc., but won’t appear on your actual website. Simple. Effective.

Don’t believe me? Go see this post on my site and see if you notice anything different.

Tip Rating:

  1. whileyouweregone posted this
blog comments powered by Disqus