Skip to content

Instantly share code, notes, and snippets.

View marcolago's full-sized avatar

Marco Lago marcolago

  • Villastellone > Turin > Italy
View GitHub Profile
@marcolago
marcolago / dabblet.css
Created July 18, 2014 12:37 — forked from anonymous/dabblet.css
2nd box Fluid with 1st, 3rd and 4th fixed width
/**
* 2nd box Fluid with 1st, 3rd and 4th fixed width
*/
.box {
float: left;
box-sizing: border-box;
border: 1px solid black;
}
@marcolago
marcolago / Streetview Draggable Pin
Created May 7, 2014 08:51
Streetview Draggable Pin
<!DOCTYPE html5>
<html">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps V3 API Sample</title>
<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var mapDiv = document.getElementById('map-canvas');
@marcolago
marcolago / isMobile Check
Last active August 29, 2015 14:00
isMobile Check
var isMobile = (function() {
var ret = {};
ret.Android = navigator.userAgent.match(/Android/i) !== null;
ret.BlackBerry = navigator.userAgent.match(/BlackBerry/i) !== null;
ret.iPhone = navigator.userAgent.match(/iPhone|iPod/i) !== null;
ret.iPad = navigator.userAgent.match(/iPad/i) !== null;
ret.iOS = (ret.iPhone || ret.iPad);
ret.Opera = navigator.userAgent.match(/Opera Mini/i) !== null;
ret.Windows = navigator.userAgent.match(/IEMobile/i) !== null;
ret.any = (ret.Android || ret.BlackBerry || ret.iOS || ret.Opera || ret.Windows);
@marcolago
marcolago / dabblet.css
Created July 15, 2013 08:26 — forked from LeaVerou/dabblet.css
CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
/**
* CSS Puzzle: Reverse the z-order of the <li>s without setting a separate z-index on each one in a way that works in IE9 and up
*/
li {
list-style: none;
display: inline-block;
padding: 1em 2em 1em 1em;
border: 1px solid rgba(0,0,0,.3);
border-radius: 0 999px 999px 0;
a {
color: green;
}
a:link:hover {
color: yellow;
}
div a {
color: brown;
a {
color: green;
}
a:hover {
color: yellow;
}
div a {
color: brown;
@marcolago
marcolago / dabblet.css
Created April 23, 2013 14:31
Per Enrico
/**
* Per Enrico
* header e footer con stack z-index corretto per l'annidamento misto
* aggiungi a .b la classe "top"
* per vedere come si sposta sopra ma resta sotto ad .a
*/
* {
margin: 0;
padding: 0;
@marcolago
marcolago / dabblet.css
Created November 23, 2012 17:28
FluidSquares in a wrapper
/**
* FluidSquares in a wrapper
* for Levan Khutsishvili
*/
body {
background-color: #00ffff;
}
#someotherdiv {
@marcolago
marcolago / dabblet.css
Created November 23, 2012 12:54
:first-child, :nth-child() and :nth-of-type() spiegati
/**
* :first-child, :nth-child() and :nth-of-type() spiegati
* per Jacopo
* da http://www.w3.org/TR/CSS2/selector.html#first-child
* "The :first-child pseudo-class matches an element that is the first child element of some other element."
* ^ ONLY IF
*/
.box {
width: 100px;
@marcolago
marcolago / dabblet.css
Created November 9, 2012 16:54
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.fl {
float: left;
width: 200px;
height: 100px;
background: #ff0000;
}