Skip to content

Instantly share code, notes, and snippets.

View SBoudrias's full-sized avatar

Simon Boudrias SBoudrias

View GitHub Profile
@SBoudrias
SBoudrias / dabblet.css
Created January 8, 2012 17:51 — forked from anonymous/dabblet.css
The first commented fne is your dabblet’s title
/**
* The first commented fne is your dabblet’s title
*/
#main {
width:700px;
margin:auto;
}
#left {
margin-right: 20px;
@SBoudrias
SBoudrias / dabblet.css
Created January 8, 2012 20:13 — forked from anonymous/dabblet.css
The first commented fne is your dabblet’s title
/**
* The first commented fne is your dabblet’s title
*/
#main {
width:700px;
margin:auto;
}
#left {
width:200px;
@SBoudrias
SBoudrias / detect_lang.php
Created January 19, 2012 16:18
Script to detect user language
function getDefaultLanguage() {
if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
return parseDefaultLanguage($_SERVER["HTTP_ACCEPT_LANGUAGE"]);
else
return parseDefaultLanguage(NULL);
}
function parseDefaultLanguage($http_accept, $deflang = "fr") {
if( isset($http_accept) && strlen($http_accept) > 1 ) {
// Split possible languages into array
@SBoudrias
SBoudrias / dabblet.css
Created January 22, 2012 20:28
Untitled
p {
display: list-item;
list-style-position:inside;
color: red;
}
@SBoudrias
SBoudrias / dabblet.css
Created January 23, 2012 01:30
Untitled
li {
float: left;
list-style-position: inside;
margin-left: 15px;
}
@SBoudrias
SBoudrias / dabblet.css
Created January 23, 2012 22:18
Untitled
ol {
counter-reset: section; /* on instancie un compteur */
padding: 0;
/* style */
background-color: #120517
}
ol li:before {
display: block;
@SBoudrias
SBoudrias / dabblet.css
Created January 31, 2012 01:38
Untitled
/**
* Centrer une bannière en CSS avec des côtés fixes et des blocs étirables
*
* @note: De manière plus moderne, le display table et l'utilisation de border-image pourraient aussi être des solutions possiblement plus propre.*
*/
#banniere {
position: relative;
height: 100px; /* pour donner une taille */
}
#banniere > div {
@SBoudrias
SBoudrias / dabblet.css
Created January 31, 2012 03:54
Untitled
/**
* Centrer une bannière en CSS avec des côtés fixes et des blocs étirables
*
* @note: De manière plus moderne, le display table et l'utilisation de border-image pourraient aussi être des solutions possiblement plus propre.*
*/
#banniere {
position: relative;
height: 100px; /* pour donner une taille */
}
#banniere > div {
@SBoudrias
SBoudrias / dabblet.css
Created January 31, 2012 03:59
Exemple de data-URI
/**
* Exemple de data-URI
*/
body {
background-color: #f1f1f1;
}
strong {
display: block;
}
.domino_page_bouton,
.domino_page_bouton:visited {
display: inline-block;
color: #fff;
text-decoration: none;
text-align: center;
font-size: 18px;
line-height: 20px;
/* Add and remove font-family to see the bug. This happen only in Google Chrome */