Skip to content

Instantly share code, notes, and snippets.

@hjortureh
hjortureh / gist:3948580
Created October 24, 2012 20:16
Responsive detect ie
<!doctype html>
<!--[if lt IE 8]><html class="oldIE"><![endif]-->
<!--[if gte IE 8]><!--><html><!--<![endif]-->
@hjortureh
hjortureh / gist:3948562
Created October 24, 2012 20:14
Responsive grid
.column {
width: 25%
float: left;
padding: 1em;
-x-box-sizing: border-box;
}
@hjortureh
hjortureh / gist:3948541
Created October 24, 2012 20:12
Responsive padding
.wrapper {
width: 100%;
padding-left: 1em;
padding-right: 1em;
}
@hjortureh
hjortureh / gist:3948527
Created October 24, 2012 20:09
Responsive height
html,
body {
height: 100%;
}
@pascalduez
pascalduez / modulename.module
Created February 22, 2012 23:33
Drupal 7 - Add a cancel button on node forms
<?php
/**
* Implements hook_form_alter().
*/
function modulename_form_alter(&$form, &$form_state, $form_id) {
// You might want to filter by content type.
if ($form_id == 'ctype_node_form') {
// Add a cancel button.
$form['actions']['cancel'] = array(