Archive for the ‘Uncategorized’ Category

Films To Look Forward To In 2012

AKA Films I’m looking forward to in 2012:

  • Prometheus
  • The Dark Knight Rises
  • Skyfall
  • Django Unchained
  • The Great Gatsby

How CSS Padding Affects Form Elements

File this one under “Tips for a Rainy Day”.

As I was styling a pretty simple contact form, I began to wonder why my submit button was significantly shorter than the text inputs above it. All were set to width: 350px, and all had 5px of padding applied. I had also ensured that all borders and browser chrome had been wiped out.

A little peek at the ‘Metrics’ panel within the Webkit Inspector revealed that as I added padding to my button, the width was actually decreasing: something that is not true for text inputs.

So there you have it: an extra 10px width ensured that all form elements were of the same appearance. It’s just a shame that silly behaviours such as these are still prevalent within the field of web design!

Hello world!

Posted on: 2 Comments

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!