Skip to content

Instantly share code, notes, and snippets.

@tomess
tomess / gist:4692061
Created February 1, 2013 15:40
HTML: Basic Template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic HTML5 Template</title>
<link href="stylesheets/style.css" rel="stylesheet" type="text/css" media="screen" />
<script src="example.js"></script>
</head>
<body>
@tomess
tomess / gist:4692139
Last active December 12, 2015 01:38
CSS: Opacity Cross Browser
.transparent_class {
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 5-7 */
filter: alpha(opacity=50);
/* Netscape */
-moz-opacity: 0.5;
@tomess
tomess / gist:4692191
Created February 1, 2013 16:00
CSS: rem/px font-size-Tabelle
font-size:10px;
font-size:0.625rem;
font-size:11px;
font-size:0.6875rem;
font-size:12px;
font-size:0.75rem;
font-size:13px;
@tomess
tomess / gist:4692308
Created February 1, 2013 16:20
Wordpress: Display Custom Field only if exist
<?php
$url = get_post_meta($post->ID, 'snippet-reference-URL', true);
if ($url) {
echo "<p><a href='$url'>Reference URL</a></p>";
}
?>
@tomess
tomess / gist:4692338
Created February 1, 2013 16:24
Wordpress: Include jQuery into a Wordpress Theme
// Replace the URL with the location of what version of jQuery you want to use.
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
wp_deregister_script('jquery');
wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
wp_enqueue_script('jquery');
}
@tomess
tomess / gist:4692376
Last active December 12, 2015 01:38
Wordpress: Datei ins Template einfügen
<?php include (TEMPLATEPATH . '/your-file.php'); ?>
@tomess
tomess / gist:4692433
Last active December 12, 2015 01:38
CSS: Schatten am oberen Seitenrand
/* Schatten am oberen Seitenrand */
body:before {
content: "";
position: fixed;
top: -10px;
left: 0;
width: 100%;
height: 10px;
-webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.8);