Cross Browser Opacity

These days, you really don’t have to worry about opacity being a difficult thing cross-browser. You just use the opacity property, like this:

.thing {
  opacity: 0.5;
}

0 is totally transparent (will not be visible at all, like visibility: …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Display a User Gravatar from an Email Address

<?php
  $gravatar_link = 'http://www.gravatar.com/avatar/' . md5($comment_author_email) . '?s=32';
   echo '<img src="' . $gravatar_link . '" />';
?>

The variable $comment_author_email would be a string of a valid email address. If the email isn’t in the Gravatar database, it will return …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Cross-Browser Min Height

div { 
   min-height: 500px; 
   height:auto !important; 
   height: 500px; 
}

This works because (thankfully?) IE treats “height” how “min-height” is supposed to be treated.

Source: Dustin Diaz

Alternate Using Expressions (IE Only)

div {
   height: expression( this.scrollHeight < 501 ? "500px" 
Avatar of Chris Coyier
Chris Coyier on (Updated on )