Posterous theme by Cory Watilo

Displaying Images as Block to Avoid Line-Height Problem

It's easy to forget that images default to inline elements. In most cases, this is not a big deal because the image is larger than the bounds of any line height restrictions. However, when the image is shorter than the applied line height style, the image might not render exactly where you would expect.

For example, I was trying to place a 4 pixel tall image within a 4 pixel tall div sized to the exact dimensions of the image. But the image was rendering about 10 pixels below the top of the div. After about an hour of debugging the layout, I finally realized that the default line height for the page was set to 21 pixels. Could that be the issue? Yes!

At first I thought maybe I could just lower the line height of the div containing the image down to 1px. That seemed to work, but it felt like a hack and the image was off by about a pixel. This morning in the shower – yes, where all good ideas come to me – I came to the conclusion that the problem wasn't the line height, it was the fact that the image was inline. Changing the display value to block fixed everything.

Yeah, I learned something new today.

IFS

Shady Hill Studios Joins Posterous

I've never blogged before. 

Well that's not totally true. At school, they made me blog once, but the subject was required. I setup a wordpress blog once, but didn't make it past "hello world!" So for all intensive purposes, this is my first blog (of sorts). 

Why posterous.com? I've heard about it for a while, but it just struck me today that it is something I should try out. In my programming work I have been personally been working through the "authentication" problem on most websites. Not how to authenticate, as much as what to authenticate. 

It used to be that we needed to provide everything – name, surname, username (screen name), email (and validate), password (and validate) and maybe even a captcha! That's been changing. Just look at  facebook, they barely require anything, and it works, for 300,000,000 and counting. But for the smaller projects that I work on, asking for email signups still seems to be like asking for the extra set of keys. I thought that there had to be a better way – phone numbers, randomly generated IDs, a new type of call and response? 

That's when it hit me how powerful the system at posterous.com was. I don't have to sign up at all. And particularly as a blogging application, I don't have to learn any news tricks. I'm using the email client I am most comfortable with, with it's own formatting, and speel check, and all!

I'm excited to try it out. So here goes.

IFS