Closing HTML 5 modal boxes

I have incorporated a popup modal when clicking on my images purely with html and css. Is there anyway to close the modal when clicking outside of it so the user does not have to use just the close button?
[php]echo ‘

’;
echo ‘
’;
echo ‘x’;
echo ‘
’;
echo “<img src=”".$image."">";
echo ‘
’;
echo ‘
’;
echo “$title”;
echo “
”;
echo ‘
    ’;
    echo ‘
  • Materials
  • ’;
    echo ‘
  • Tools
  • ’;
    echo ‘
  • Category
  • ’;
    echo ‘
  • Skill Level
  • ’;
    echo ‘
  • Price
  • ’;
    echo ‘
  • Time
  • ’;
    echo ‘
  • Tutorial by
  • ’;
    echo ‘
’;
echo ‘
    ’;
    echo ‘
  • N/A
  • ’;
    echo ‘
  • N/A
  • ’;
    echo “
  • N/A
  • ”;
    echo “
  • 2
  • ”;
    echo “
  • 1
  • ”;
    echo “
  • 1
  • ”;
    echo “
  • $owner
  • ”;
    echo ‘
’;
echo ‘
’;
echo ‘
’;[/php]

you could try something like:

[code]a.exit { display: block; position: absolute … }

...
....[/code]

but it’ll need a lot of testing with all browsers, maybe a z-index and than you only want the background, not anything but “x”.

but i hope that gives u a starting point, how it might work, if it works at all.

Sponsor our Newsletter | Privacy Policy | Terms of Service