Negative Z-index kills links

Posted on: 9th October 2011 1 Comment

Here is something I stumbled over today: a negative Z-index value in your CSS will kill the links in whatever the Z-index covers. Maybe old info for some, but it was new to me. So if you use Z-index to stack, make sure you only use positive values when handling links.

I was working with two divs on a page, lets call them #boxOne and #boxTwo. And I wanted the top div to have drop shadow, so it looked like it was floating over the bottom one. My CSS looked something like this:

#boxOne {
	background: #BF8C60;
	width: 100px;
	height: 100px;
	box-shadow:5px 5px 20px #000;
	-webkit-box-shadow:5px 5px 20px #000;
	-moz-box-shadow: 5px 5px 20px #000;
}
#boxTwo {
	background: #A66C4B;
	width: 100px;
	height: 100px;
}

But the way the page elements are stacked on a page, meant that #boxTwo was stacked over #boxOne, and breaking the drop shadow illusion. But no worries, I googled stacking, and got w3schools description (don’t judge me!). Summary: set z-index to -1. And I did, by adding this to #boxTow:

position: relative;
z-index: -1;
Stacked div boxes

#boxOne and #boxTwo. From left: no drop shadow, with drop shadow and default stack, changed stack order, and with useless link.

And it seemed to work, all the way until I added a link in #boxTwo. And the link was un-clickable. The pointer didn’t recognise it as a link. Turns out, when you set the Z-index to a negative, it is set behind what is possible to interact with. The solution: give both boxes a Z-index, with #boxOne’s the highest:

#boxOne {
	position: relative;
	z-index:2;
	background: #BF8C60;
	width: 100px;
	height: 100px;
	box-shadow:5px 5px 20px #000;
	-webkit-box-shadow:5px 5px 20px #000;
	-moz-box-shadow: 5px 5px 20px #000;
}
#boxTwo {
	position: relative;
	z-index: 1;
	background: #A66C4B;
	width: 100px;
	height: 100px;
}

So there you go. Always better to be positive!



I’m gonna grab me some screen

Posted on: 18th September 2011 No Comments

Sometimes I need to grab something that happens on my screen. May be for a blog post, a report, or just to show someone something funny.

Where I used to work before, I made a lot of manuals and instructions. And in this work, TechSmith’s SnagIt! became my trusted friend. This is a screen grabber with a lot of options, and it became a revelation to everyone who used it. However, when I moved forward and away from this job, I gave up SnagIt!, since I didn’t want to fork up for something I might get for free in another software. SnagIt! was developed for Windows (the one I’ve used), but has also been released as a Mac app.

After a tip from one of my tutors, I ended up with Jing, also from TechSmith. This is a free software (also comes a a more feature rich paid version), that gave me my basic screen grabbing options. I installed it on both my Mac and PC, and it works the same on both. When started, it features as a little sun on the top of your screen, and it easy to use. All very well.

As I write this, a free app called Skitch, is at number 6 in App Store for Mac’s list over most downloaded freeware. This, as Jing, is a app that sits happy in the background, until you need it, and you have you basic grabbing options covered. And, as the two mentioned above, it gives you the option to edit your grab by adding texts and arrows and other stuff to it, before saving or sending.

But it turns out, that for most of my grabbing needs, I need to look no further than my Mac keyboard. I come a very long way by just using these keyboard shortcuts:

cmd+shift+3 – Saves your screen as a image file
cmd+shift+fn+3 – Saves your screen on your clipboard
cmd+shift+4 – Saves a selection of choice as a image file
cmd+shift+fn+4 – Saves a selection of choice on you clipboard
cmd+shift+4, then hit space – Saves a chosen app window as a image file
cmd+shift+fn+4, then hit space – Saves a chosen app window on your clipboard

The best thing about this shortcut approach, is that the window you are grabbing, remains the active window. Because when you use a app to grab, this grab app becomes the active one, and the window you are grabbing, can fade. And that can give a not so good result.

Be aware, that when you grab a whole app window (by using cmd+shift+4, then push space), the image will be saved with an annoying, fancy shade around itself.

The images that are grabbed like this, is saved as PNG.



Clean install Mac OS X Lion

Posted on: 17th September 2011 3 Comments

When it comes to computers, there is nothing like a fresh OS install. Over the years as a Windows user, i used to do a fresh install now and then when the computer started dragging it’s legs. But I’ve never done it on my Mac, a Mac I’ve now filled with crap for two years. And it was now staring to show sign of lagging, and the upgrade to Lion didn’t make it any faster. So I decided to make a clean install of Lion, and start afresh.

The thing you need to make a clean install is a bootable device, a DVD or USB-stick, with the Lion installer on it. When you download Lion from the App Store, you are installing an install Lion package, that you execute when you are ready. In this package, you want to copy the file InstallESD.dmg over to your bootable device. To do so, you must open your Application folder in Finder, right click on it, and choose Show Package Contents. The file is in Contents\SharedSupport-folder. Copy it to your device, and you are ready to go.

When you do the upgrade, Lion deletes the install package. So if you did the upgrade without copying InstallSED.dmg first, you need to re-download the package from App Store. To do so, you must open App Store, and hold down the alt-button while you press the Purchased button. This will list your purchased history, with the option to install the Lion updater again. It seems like you can’t let go of the alt-button before the App Store has shown you the whole list. And after you download it once more, do copy the desired file to you device.

Before you make the clean install, make sure you take backup of everything you need to take backup of. To backup all of your users folders (desktop, documents, downloads, movies, music, pictures, sites) is probably a good tip. In addition it might be a good idea to copy your keychains.

I also made a list of my applications, and made sure I had all my serials stored somewhere safe (in my case Evernote). Apps bought from App Store can be re-installed with no hassle.

So on to the actually install. Pop in your device (I used a DVD) and restart the machine. When it starts to boot, hold down alt. This will give you a list of all your bootable devices. Your current OS X disk, the Lion recovery disk (if you already  have Lion installed), any BootCamp disks, and you Lion installer device. It is apparently slower to use a disk than a USB-stick. I used a DVD, and it took some seconds before it showed up next to the others. So when it decides to turn up, double click on it and you you will get the Lion menu.

On the Lion menu, you are here interested in two of the four options. You have Reinstall Lion of course, but before you go there, go in to the Disk Utility option. There you choose your OS partition (where you want to reinstall Lion) and use the erase option. Choose Mac OS Extended (journaled) as your format. When the partition is erased and data free, you go back, and choose Reinstall Lion. And Lion will be installed and you will be guided through the installation steps. You need to enter your App Store user name and password during these steps, so make sure you have them handy.

And so, you’ll hopefully end up with a new and fresh install, where everything works. Or everything crashes and burns. Anyway, it worked for me, and I think it doesn’t lag as much anymore. I could of course be delusional.

What remains is re-installing your software, and copying back your files. Be aware, that any software that came pre-intalled on your Mac when you bought it (like iPhoto, iMovie), are now gone, and you might be in trouble if you have no installation disks with these on.

And if everything goes tits up, you have always internet forums to shout at.



The Muppet parody trailers

Posted on: 16th September 2011 No Comments

This thanksgiving (if you’re American) or much later (if you’re not), there is a new Muppets movie in the cinemas. In this movie the Muppets must save the Muppets theatre from some evil dude, and get the old gang back together. The Movie stars (alongside the Muppets) Jason Segel and Amy Adams.

What has caught my eye when it comes to this film, is the teaser trailers. There have been several teaser trailers for the film, copying other trailers, that have been done quite nicely. So far we have these:

Green With Envy

They started out with these very generic romantic comedy trailer parody:

The Fuzzy Pack

Then they saw what the guys promoting The Hangover Part II did:

This is the wolf pack trailer for Hangover Part II

Being Green

And then another green hero, The Green Lantern, became Muppetized:

The Girl with the Froggy Tattoo

And then my favourite so far. David Fincher does The Muppets:

The trailer for The Girl With The Dragon Tattoo.

Hopefully the movie can live up to the teasers, but who knows. Here are anyway the full trailer:

Update 11/11

The Final Muppets Parody Trailer

Of course they didn’t stop. In the end of October, they released what they called “The Final Muppets Parody Trailer”. A trailer that touched upon Paranormal Activity, Puss in Boots, Happy Feet, Breaking Dawn, and in a meta moment, their own Green With Envy parody trailer.

Taking over Bollywood

And then, after the final parody trailer, they came with a Bollywood trailer today, where the Muppets are accompanied by some hefty Indian rhythms.

Is this all?



Display the “secret” preference pane in Twitter for Mac

Posted on: 15th September 2011 No Comments

The official Twitter client for Mac OS X, who was born Tweetie, has a hidden options pane. And it is this pane that has the option to show full names of the user in your Twitter feed, and not just the user names. It is possible to change to full name-view by entering this line in Terminal: defaults write com.twitter.twitter-mac ShowFullNames 1. To disable, use 0 instead of 1. But to get this option into a menu, enter this line in terminal instead: defaults write com.twitter.twitter-mac DebugMode -bool true.

 

Termial line to enable secret Twitter pane

Termial line to enable secret Twitter pane

And hey presto! Restart Twitter, and you will have a new menu under preferences.

 

Secret option pane in Twitter for Mac

Secret option pane in Twitter for Mac

This was originally meant as a secret thank you to those of us that had bought Tweetie before it transformed into the free Twitter client it is today. But why it hides such a vital option as view full name is beyond me.