Archive for December, 2014

CSS box shadow

Here are some lesser-know tricks for CSS dropshadows.
http://css-tricks.com/snippets/css/css-box-shadow/

You can create the following styles:

Using the following code:

<style type="text/css">
#example {
background: none repeat scroll 0 0 #ccc;
box-shadow: 5px 5px 5px #666;
height: 100px;
margin: 15px 0;
width: 100px;
}
#example2 {
background: none repeat scroll 0 0 #ccc;
box-shadow: 0 0 10px #000000 inset;
height: 100px;
margin: 15px 0;
width: 100px;
}
#example3 {
background: none repeat scroll 0 0 #ccc;
box-shadow: 0 8px 6px -6px black;
height: 100px;
margin: 15px 0;
width: 100px;
}
</style>

Force downloads on certain filetypes

If you want to force a certain filetype to be downloaded (and not be opened directly in the browser) add the following into an .htaccess file in the directory of the files.
Change the filetype to match your needs.

<FilesMatch "\.(gif|jpe?g|png)$">
   ForceType application/octet-stream
   Header set Content-Disposition attachment
</FilesMatch>